Not sure against what material or what rounds are compared.
In all tests I've seen against flak jackets, the heavy helmets the Speznaz use, etc, a 5.56mm round went straight through stuff that barely got slightly dented by a 9mm or even a .357 Magnum. As in, in one heavy helmet test, it also put a hole out the back of it.
E.g., in the EU VPAM standard, stopping a round-nose 9x19mm is PM2 class, while stopping 5.56×45mm is PM7. That's actually one up from the PM6 needed to stop mild steel core 7.62×39mm. The same kind of different scale applies to UK standards, US Army standards, etc.
Or going to the round specs, common 5.56mm rounds rated against 12mm of steel at 100m, whereas for 9mm even the PBP 9×19mm overpressure round only goes through 8mm at 10m. And yes, that's not a typo. There's actually one zero missing in the latter. The 5.56mm round still has VASTLY more penetration at 100m than some of the best 9mm rounds have at 10m.
I.e., it's not just what penetration it has at point blank range. The longer rifle round maintain the potential to go through two layers of window pane and still be lethal over a much longer distance. Whereas for a 9mm it might happen if some guy shoots and misses from across a suburban street, for a 5.56mm the same holds true for a guy at half a kilometre away.
It also doesn't help the comparison that at least in the USA, you're probably more likely to be shot at with a .45 ACP than with a 9mm. Americans seem to like 'em big. But the slower speed of a .45 ACP bullet also means it's got a LOT less penetration.
It also doesn't help that unless the one shooting a 9 mil is a soldier in the course of duty, they probably will have JHP loaded, which has MUCH less penetration. It's also MUCH less likely to be an overpressure round (the NATO 9mm round is essentially a +P Parabellum.) Many of the cheaper civillian weapons don't even have the barrel rated to (safely) shoot a +P round.
By way of comparison, from stuff like an AK for example, they're just as likely to have loaded whatever was cheaper, which may actually be a steel core bullet.
Now whether that's reason enough to forbid one or the other, you can make up your own mind. But claiming that the pistol round has more penetration than the rifle one is... misleading at best. It might be true in some niche cases, but it's very far from being true in most cases.