Restarting will work. Other methods to remove the maximized browser window:
- Press F11 to exit the browser from full screen mode, then close the tab
- Press Alt + F4 (until the browser process is terminated) or Ctrl + W (to close the tab)
- Press Ctrl + Shift + Escape to open Task Manager, locate the browser processes and right click End Task
- Hold the power button down until your computer turns off (this will always work)
After that, clear your browser's cache.
For Edge, enter edge://settings/clearBrowserData into the URL bar. Select the first three options then press Clear now
For Chrome - https://support.google.com/accounts/answer/32050?sjid=15486707136132768444-AP
Firefox - https://support.mozilla.org/en-US/kb/how-clear-firefox-cache
To minimize the likelihood of this happening again, install an Adblocker.
https://microsoftedge.microsoft.com/addons/detail/ublock-origin/odfafepnkmbhccpbejgmiehpchacaeak
Further reading -