It seems the bug was never fixed upstream in KWin 5.x. Fix was deployed to KWin 6.x only. If you want, I can try to backport the fix to bookworm's KWin 5.x and test the fix on my computer. I didn't do this yet, because I'm not sure whether anybody actually reads all these bug reports. So, if you actually read these reports and you want me to try to write and test the fix, then, please, just tell me to do so, and I will happily do it. I have time until 22 Jan 2025, then I will move to other things.
-- Askar Safin