The fakes are more likely production rejects packaged up.They did use different size die in the 7805 and 78M05 both in TO-220. The latter was only rated half an amp. The TO-3 and the ones without the M used the same die. Then there was an even smaller L die for the TO-92. The 3 die sizes had specific current limiting for the size. God only knows what may be in a truly fake die - or if it even had current/thermal limiting at all.
The internal circuit of a 78x05 is well known and easy to make, so no point faking the die. You would have to design a smaller 78M05 sized die with a higher current limit. This would be too much hard work
Or they could just sell you an M05 for an 05 and hope you can’t tell the difference. Your circuit may be drawing 400 mA and it will motor along just fine. Till you need to draw more.