The reason baby boys pee on you or pee when you change their diaper is the change in temperature and air suddenly hitting the penis.
In the diaper the penis is usually warm and when you open up the diaper suddenly air gets to the penis which is sensitive.
That air for some reason hitting the penis can cause the baby boy to get erect and then the baby suddenly pees.
I've been peed on myself from my own boys when they were infants and even my 2 year old when I change his diaper will sometimes start peeing when I change his diaper.
What I did and still do is open the diaper up slightly and then watch for signs of peeing and if they are peeing I put the diaper back over the penis and let them finish and wait a minute or two.
Then they are usually done peeing and I don't get peed on.
Then change the diaper.
Or put before you remove the diaper put a sock or towel over the penis under the diaper and remove the diaper.
That way the sock or towel or rag catches the pee if they pee.
Then remove the sock, towel, rag etc and then put the diaper over them and tape it up.
Some babies will stop peeing when diaper changes are happening but some continue it for awhile.