there is another topic open where the author also used the approach to replace the physics list with a different one, and had unexpected results: Replace part of reference physics list - #4 by afinch
could you check if you get the same when you directly use the respective physics list? would be very interesting to see, I will probably need to simulate xray tubes as well…
// Physics list
G4VModularPhysicsList* physicsList = new G4EmStandardPhysics_option4();
physicsList->SetVerboseLevel(1);
runManager->SetUserInitialization(physicsList);
in the macro, you might then also need adjust the production cuts to have the same settings as in @idrissi_abdelghani physics list:
/run/setCutForAGivenParticle gamma 1 micrometer
/run/setCutForAGivenParticle e- 1 micrometer