Firefox Android address bar overlaps content after exit fullscreen

My addon has its own page that can be opened in its own tab. There is a fullscreen option, but every time after leaving the fullscreen, a part of the page disappears under the address bar of Firefox Android. When I rotate the device everything is correct again, but I can’t find a programmable solution.

Edit: Thats the same bug: https://stackoverflow.com/questions/20636580/firefox-for-android-address-bar-overlaps-content-is-there-a-solution
How it’s possible that there is no solution after 8 years? Is this a device specific bug?

The problem is that I can’t just put a margin at the top either, because I never know when the address bar will overlap the content and when it won’t. If I always set the margin it wastes space unnecessarily and looks ugly.
Does anyone have an idea what I can do?