If your mouse cursor keeps leaving the game screen and clicking your bookmarks, press F11 to enter Fullscreen mode. This usually locks the mouse to the game.
If you own Doom on Steam, GOG, or an old disk, you legally own the full game data (the .WAD files). You can play the full version in a browser using specific HTML5 source ports. doom online browser
Search for "JS-DOOM online" – several developer portfolios host it. If your mouse cursor keeps leaving the game