That is awkward, as it’s difficult to know what to suggest. Maybe best left for someone better skilled to diagnosis and repair for you.
There is a small work around (bush fix) you could try without being too invasive, and you wouldn’t need to lift the tank. It would require you to remove a portion of the black sleeving on the ignition loom harness to expose the wires.
Locate the grey/blue or white/blue wire ( not sure of the master colour, but there is only one wire with a blue stripe). Get a dress makers pin and push it through the wire so that it makes contact with the copper core. This will allow you to check for power at that point or working your way back along the wire until you do. Once you establish you have power (assuming broken wire) and as a temporary fix. You could push the same pin all the way through the Grey wire. Joining the two together electrically and and then Cutting off any excess exposed dress makers pin, then taping the join, making sure it’s well taped. This will electrically connect the tail and side light circuits together via the pin, bypassing the ignition switch connections for the light circuit. You will still maintain full functionality including parking lights.
This will Buy you time to sort out a more permanent fix, assuming you need the bike.
Well you have just about got all the information you need, either changing the switch or affecting a temporary repair/bush fix. Let us know how you get on.