Shark bites are allowed behind the wall for plumbing.
The only place you wouldn't use a sharkbite drop ear is if someone is running PEX to a tub spout. There you would use something like copper pipe to the drop ear for a tub spout, and the that sizing would work for a tub spout.
But nothing else in the home has that restriction. A sharkbite drop ear in the wall for a water heater would be fine.
Most plumbers prefer them to be exposed though. It does have moving parts that can fail.
I have a few sharkbites in the vans, but they are rarely used. I mainly use copper sweat fittings and PEX fittings with compression rings.