@Emil The permissions I enabled were "Show on Lock screen" and "Display pop-up windows while running in the background". These are shown on a picture here https://stackoverflow.com/questions/71449643/how-can-i-get-the-display-pop-up-windows-while-running-in-the-background-and
You were correct, there's an additional permission to start on boot. It worked similar how described here https://nine-faq.9folders.com/articles/8772-how-to-manage-autostart-service-on-the-xiaomi-devices