I am HK Armorer Certified on the HK4 and work on them often. Hard to diagnose your issue from the information provided.
There is no external "slide release" per say on the HK4, as we would think of a slide release on other semi auto pistols. On the HK4, that function is internal only. Inserting and searing a magazine lifts it, internally, up and out of position with the slide, sending the slide forward.
The takedown lever, mounted within the trigger guard, just forward of the trigger, releases the slide from the receiver for takedown. Not sure which you are referring to.
Either way, I'd want to inspect the pistol.
Going out on a limb, the takedown lever works with a spring and detent and against the locking lug on the bottom of the barrel. The locking lug on the barrel also fits against a raised portion on the receiver, just to the rear of where the recoil buffer and plate are positioned. It is common on the HK4 that damage can occur to this area of the receiver, often chipping or cracking. If this has occurred, your barrel/slide/receiver lockup will be compromised and that could be your issue.
If instead you are referring to the slide release, which sends your slide forward with a newly inserted magazine, I'd look for damage or misalignment there.
Either way, if you'd like to send me your pistol for service, you can contact me through my website, linked below.