It might be that you accidentally enable this debug window.
Ensure Safari’s “Develop” menu is showing:
- Safari > Preferences > Advanced > Show Develop menu in menu bar
- Uncheck both:
- Safari > Develop > Computer Name > Automatically Show Web Inspector for JSContexts
- Safari > Develop > Computer Name > Automatically Pause Connecting JSContexts