I have made the code changes after installation, use sys.executable, and then restart the apache in both the above test scenario. All the utilities(Backup, Maintainance, etc...) working absolutely fine. Please refer to the below screenshot
Am I missing some scenario? If any specific test scenario that I missed please let me know so that I'll figure out some solution.
I don't remember the exact scenario/steps but AFAIR we rewrote that logic to handle scenario when we run pgAdmin4 under WSGI and/or on Windows, It was using the wrong python path to execute the process executor.