HS baseball has a case section about this play being illegal--in fact it is penalized the same as detached equipment with a 2 base award.Why isn't it legal? It is legal in MLB so I'd be curious to find what the ruling is.
No, in FED baseball this isn't treated the same as detached equipment. It's treated as a ball that becomes lodged in a defensive player's uniform or equipment.
The main difference is that for detached equipment you have a delayed dead ball and runners may advance beyond their awarded bases. For a lodged ball, the ball is immediately dead.
As noted, FED baseball is unique in their ruling. This is a fairly recent interpretation on their part. The interpretation and case play were added about ten years ago. For softball, no such ruling has been issued.
Just going from memory here...if I recall correctly, NFHS issued a ruling for softball a few years ago that specifically said this was a legal play. It was one of the yearly rule interpretations that they publish in their pre-season guide. I hate to hang my hat on "I think I remember", but going back through all those old pre-season guides will take some digging.