We had a similar request and we have written a postgresql function to concurrently detach old partition in version 15, unfortunately we cannot use concurrently inside a postgresql function. We have to apply a logic and run individual detach commands for each partition via pg_cron.
If you need to detach concurrently, you will have to use some separate process to do it at this time. Not sure if that can be done with pg_cron since I'm not sure if that is also doing its own calls within a functional transaction.