I see it in MOCs all the time, and I’ve seen studs connect on half pins in official sets, but what about full pins?
The presentation that senior Lego designer Jamie Berard held at Brickcon 2006 and that spawned the entire legal vs illegal discussion can be found here:
The particular case you ask for is discussed in slides 9 and 10:
According to LEGO, this type of connection is illegal, since the pin is stressed when connected to an anti-stud and eventually deforms.
People's MOCs do not follow same policy as TLG does. So you may encounter illegal connections from time to time. Pins are also cheap and usually owned in high numbers, so nobody's really bothered if one gets deformed.