Since a few days I have this weird bug. it's also happening on my laptop. Edge doesn't have this problem.
Edit: This bug seems to be linked to my google account and not Firefox. It also happens in Edge when logged in. It only happens to one specific google account. When logged in to a different account it does not happen. F12 Consoles look identical on both accounts.
(Also there is this old guide "How to ask questions the smart way". If you consider these things, usually you can get answers more quickly on the internet.)
I use, Ublock origin, Return YouTube Dislike, SponsorBlock for YouTube, Wayback Machine and Mendeley Web Importer. When all add-ons are disabled it does the same thing even after restarting windows. The console has long list of warnings. I'm not sure how to post them. Most of them say "Feature Policy: Skipping unsupported feature name", "Cookie “something” does not have a proper “SameSite” attribute value", "Content-Security-Policy warnings 2" or
"Empty string passed to getElementById().". I'll keep the guide in mind for the future.