According to docs: https://docs.python.org/3/library/asyncio-task.html
The task is executed in the loop returned by get_running_loop(), RuntimeError is raised if there is no running loop in current thread.
https://docs.python.org/3/whatsnew/3.14.html#id10
If you’re running an async function, simply use asyncio.run().