I'm not sure that using Pinia is appropriate with Inertia, it's a server-side rendered front-end, and although there are packages that allow state persistence after a server-to-client reload via localStorage (https://github.com/prazdevs/pinia-plugin-persistedstate), it may not be necessary.
And since a server-side call is made with page changes, it's possible to use the middleware proposed in the documentation (https://inertiajs.com/shared-data).
Ideally, you'd like to use a socket to do this, but it all depends on your need and cost.
Maybe we can simply put the process on hold and process an email or notification as soon as it finishes.