As stated by Milan, you could replace OpenMP directives by collective subroutines. I had started a project to explore coarrays and collective subroutines:
You can compare those two files:
https://github.com/vmagnin/exploring_coarrays/blob/main/pi_monte_carlo_openmp.f90
https://github.com/vmagnin/exploring_coarrays/blob/main/pi_monte_carlo_co_sum.f90
I have no time to progress further for the moment, but it can help you.