Project function in dolfinx

You seem to have implemented the projection already, so I dont really understand this question. See for instance Where to find 'project'-function in dolfinx? - #2 by nate

Try to run your code as a Python script (rather than a notebook) as it might give you a error traceback you could share.

Please also consider simplifying your problem.
Start by removing one of the project functions, remove the loading loop and deduce what line of code is causing your crash.