You are correct in that it seems like fastapi_profiler has not been updated to use the new lifespan setup. Looking at the code, I can't see any obvious way to work around that. Maybe you should submit a pull request? Or at least, open an issue?
fastapi_profiler