@KnowZero I was wondering if you found time to fix this?
If I try to add a transparency mask the way @Elis4 describes, Krita 5.2.9 crashes. (Not immediately, but leaving it idle for a while makes it crash eventually.) The tooltip of the mask is an empty image.
(The convert_to_transparency_mask route isn’t working for me because I don’t succeed in setting a new layer as the active one. setActiveNode does not change active node only has a solution for selections.)