When watching YouTube in fullscreen, the shortcut Cmd+W does not do anything.
In Safari, it closes it and puts the video on 'pause'. Other browsers close the originating tab fully.
It should close the fullscreen window (and perhaps the originating tab, too).
About a year ago, I released a similar bug report with deviating behaviour in fullscreen while watching a video. Perhaps the solution from that time will help to resolve this issue, too https://orionfeedback.org/d/8292-cmd-t-opens-tab-in-background-while-in-fullscreen
Orion Version 0.99.135.0.1-beta (WebKit 622.1.15.19.2)
Sequoia (15)