I got some progress on the issue.
The problem does not occur when krita uses OpenGL canvas acceleration. DirectX and native renderer both display transparency as black.
I tried several combinations of flags and attributes, with no success, but with OpenGL you don’t need to change anything in code from krita 5. FramelessWindow + Popup flag combo works just fine. Maybe the reason it still works on Linux is that it comes only with OpenGL renderer.
Unless somebody finds a better solution, on krita startup I’ll probably be detecting when OpenGL is not enabled and display a “don’t ask me again” warning suggesting a switch.