Floating menu doesn't recover window level after hover

This configuration changes the window level of the floating menu when cursor hovers it, but it doesn't return the floating menu to level 24 once the cursor stops hovering the floating menu.

Is it by design or a bug?

Captura de pantalla 2023-10-21 a les 11.52.34

Hiding the menu and showing it again makes a kind of refresh and then then floating menu recover the window level = 24