While it’s far less frequent, I encountered that Random Attack Glitch while playing as the Predator against a full Fireteam.
I think the Issue has to do with the Weapon Wheel, most notably when you Leap, then select your Gear (via the Weapon Wheel) upon Landing and then immediately try to switch back from, say, a Bear Trap back to the Net Gun. Quickly Swapping Gear is common when attempting to Engage a Fireteam. And since us PS4 Players are restricted to L1 Button, we use it frequently.
This leads to A: you being stuck with your Bear Trap where you can’t use it or swap back to anything else and B: Random Melee Attacks while attempting to Sprint and Leap Slams when you aren’t even holding your Attack/Fire Button.