Changing scaling while Firefox is in fullscreen breaks the browser

1- Open a YouTube video in fullscreen.
2- Press Super and open System Settings > Monitor.
3- Change the scaling and save it.

Result: The browser’s UI is broken.

Is this a KDE bug or a Firefox bug?