The title says it all. Floating window wont work on YouTube. Any idea why this happens. Maybe Google asked Xiaomi to remove this feature? It happens since version 20.8.6
So it's a good idea to use Youtube Vanced now => https://vanced.app (Install "Vanced Manager" app then open it to install "nonroot" Vanced & microG apps).
I have the root version of YouTube Vanced installed and floating window is blocked. I'm guessing Xiaomi is checking the package name of the app to determine if floating window is allowed or not. Vanced root has the same package name as the official YouTube app so it's blocked whereas Vanced non-root has a different package name so it is allowed to run in floating window.