I think you've got the regulator drawn the wrong way round.
I had an issue with regulators failing some time ago (
https://www.electro-tech-online.com/threads/regulators-failing.91068/)
It could be useful to extend the circuit to whatever is being powered from the 5 V supply and from the 45 V supply, as I am fairly sure that you wouldn't run a 5 V regulator from around 45 V unless there was some other reason to have a 45 V supply.
As this problem is happening on start-up, it could be caused by the power supply voltage going down briefly, so either the regulator or Q1 has a larger voltage on their output than on their input. That is what was causing the problem that I had. The possibility of reverse current is mentioned in the data sheet for the LM1117.
There are a few things that can cause the supply voltage to go down briefly during power up.
1) The mains input not being turned on cleanly.
2) The mains input being turned on near the end of the mains cycle so that the first cycle doesn't charge the capacitors fully.
3) The mains input being turned on near the start of the mains cycle, so that the transformer core saturates for about 1/4 of a cycle, giving no output voltage for that time.
4) The load on the 45 V supply being turned on before the voltage is high enough.
Oscilloscope traces during turn-on would be useful.
If you don't know what the problem is you could try:-
1) Use a simple 15 V zener instead of Q2 + zener. You don't need to accurately set the 15 V and there's not much power dissipation as there is a 5k6 resistor.
2) Add a diode on the emitter of Q1
3) Feed the collector of Q1 via a resistor. You can lose up to about 20 V without affecting the voltage of the 5 V supply.
4) Run the 15 V / 5 V supply from the centre tap of the transformer. It will need its own smoothing capacitor but it won't be affected by what the 45V supply does and there will be much less power dissipation.