Window shading in Wayland

Switching to Wayland for Plasma 6 really made me realize how much I rely on window shading.

I’ve noticed that it still works for some apps like Element, Avalonia UI apps, etc. where as most other types of apps just don’t work with it at all.
Firefox used to work at least a year ago, but not anymore.

Are there any workarounds to make it work on Wayland, like scripts that sets the height to 0 when you scroll the titlebar?

Unfortunately it doesn’t look that it’s going to be resolved anytime soon. You can follow this report here: 377162 – Window shading not supported for Wayland windows

why does it work for Element though? Somehow Electron-based apps still work with shading it seems, but that’s weird.

Those are probably XWayland windows, which are described in that bug report as still able to be “rolled up”.