Need help with power supply circuit

i’m currently designing a device which uses GSM module. which works on 12V and if the main supply is not there, it will run on battery. right now i’m facing a problem in power supply circuit. i’m using a BLE module which works on 3.3V, the BLE module controls the GSM module switching it On and Off. the issue is the BLE module reboots every once in a while. when the BLE module reboots, the GSM module also reboots. i believe this occurs because i’m using the same supply for both GSM module and also the 3.3V regulator. it would be very helpful if some you can give me some suggestions. i have attached image of the power supply circuit