omg I figured it out. The switch I was using to enter into bootsel mode isnt actually connected to the bootsel pin. The original firmware must have its own logic on boot for triggering bootsel mode when a certain switch is held. Thats why when I flashed my own firmware that switch stopped working. The real bootsel pin is connected to that footprint labelled "boot" in your screenshot. Once I shorted that with a wire (the switch is unpopulated) it successfully booted into bootsel mode. It was a bit of a silly mistake but I learnt a lot from everyone's advice. Thankyou