But you replaced the switch, and the behaviour did not change.
So either the new switch had the same fault - unlikely, but possible - or the fault is elsewhere. So where could that be
One possibility is the starter motor button. The right hand bulb power passes through the starter button, so that lights are turned off when starting the bike. You can use that to flash lights at night time... Another possibility is the circuit or connectors that feed the handlebar switch.