I've tried to install GSX in P3Dv4 but as it is already installed in P3Dv3 I can't make the installer to change directory to P3Dv4.
You are not supposed to change the directory to the sim! We don't install inside the sim folder anymore, we now use by default, a shared location for all our products, OUTSIDE the sim, and this will be the same folder, regardless in how many simulators you install into, so it won't double or triple the space taken if you install into FSX, P3D3 and P4D4, as if used to be with the old installer.
However, is not clear about your current situation: you said GSX is already installed in P3Dv3:
1) Have you used a recent installer (one released after June last year) ? If yes, do you mean you haven't accepted the suggested folder (C:\Program Files (x86)\Addon Manager), assumed the installer didn't know how to find the sim and manually chose the P3D V3 folder ? In this case, it would be best you Uninstall every FSDT product, reply YES to the question "Do you want to remove the Addon Manager", then reinstall every FSDT product again, this time using either the default folder, or any other one, but it's best if you install OUTSIDE the sim, now that you can.
OR
2) Have you used a recent installer, and accepted the default folder, or installed somewhere else, but OUTSIDE the sim ? In this case, you should be fine and, to add P3D4, run the installer again, and be sure P3D4 is selected for the installation.
OR
3) Have you installed using an old installer, one that automatically installed itself into the sim folder, depending on the sim used ? In this case, running the new installer will migrate your existing P3D3 installation to move every FSDT product to be OUTSIDE the sim folder.