But if you do it safely, risk of injury is very low. Less than spraining an ankle running on wet grass (which football and soccer players do all the time).
the load on the shoulder joints in this position is very unfavourable.
millions of people run every day, of course there are injuries.
It’s the finger, wrist and elbow joints and ligaments (your fingers need to act as toes, your arms are now legs) and not learning how to bail safely (if you flip over and don’t have the reflex to cart wheel out).
There's a reason why handstand pushups (often done against a wall for muscle-building/strength purposes) are considered an advanced shoulder exercise. It's sort of the calisthenics equivalent of the overhead press.
Do free floating handstands for time and see what hurts more.
I could also walk on my hands for a fairly long distance (it turns out once you are comfortable with supporting your weight on your hands it is easier than standing still), and when I had a spotter or was against a wall could do 1 arm hand stands and press up from a tripod headstand to a handstand (which is in fact super dangerous if you don't know what you are doing). It is one hell of an upper body work out though ;-)
Unfortunately I have not down any inversions in probably a year now due to the pandemic and other issues, and several months ago I injured my shoulder in unrelated way, so probably not going to be getting back into my old routines any time soon...