Maybe the cocking tube support detent is worn/the detent spring is broken thus the detent doesn't pop up. It supposed to stop the cocking tube support from moving unintentionally.
To see if it's the cocking tube support's issue, just replace one new/from a working gun and try it. If there is no problem then you can sure pin point the malfunction is caused by the tube support.
You need to send your gun to someone who builds and/or knows Mp5s. Everyone you brought it to knows nothing about your gun. I would recommend Ralph at RDTS, he has been specializing in MP5s and other HKs for around 30 years. He has a detailed Instagram page under RDTS. Don't go to his website if you come across it as it is very outdated. I have two of his guns and he is a great guy to talk to.
A forum dedicated to and laser-focused on Heckler & Koch firearms, Heckler & Koch accessories and the owners and enthusiasts that love them! Come join the discussion regarding HK pistols, long arms, NFA arms, HK accessories, HK history and trivia and more.