How to make Kicad alow P-MOSFET as switch without ERC problems?
PWR_FLAGs are not connected together. To solve your problem you can edit the mosfet symbol and set its pins as passive, you can connect anything to a passive pin type.

This solution is kind of a hack though, but it can't be helped because the kicad pin types are somewhat limited. When you use such a trick be extra sure to connect everything as intended because the DRC won't help you.