in honour of candymania on sd~
choosing to interpret this wwe unreal scene after the wm42 match in kayfabe, where randy goes, "I did that to him?! 😦" referring to the punt kick and cody's bleeding eye + head as sort of randy when he's possessed by 'the voices' as a dissociative state. you can see he can't quite believe he did that, and needs triple h to walk him through the sequence of how it happened
now why would cody in kayfabe be so okay with randy immediately after the match where he got brutalized? well first. he retained the belt, he's referred to it an addiction so winning is like getting a fresh supply. second, adrenaline of the match means the pain hasn't set in yet. he's bled before, he likes to bleed (sicko) the severity hasn't hit him yet.
thirdly, cody doesn't really hug randy back. he stands there and accepts it, and attempts to deflect the eye and randy's concern by joking around with others. he asks randy if he's okay, and calls triple h by name. he's hoping that he's protected since they're in gorilla and all these important people including their bosses and his wife are there. appeal to authority, safety in numbers.
and finally, both within and outside of kayfabe - cody loves randy. it's not even the first wrestlemania he's taken a punt from randy to the head! insane! he's maybe the only person to fully understand and empathise with how randy gets when the voices take control (shoutout smackdown 2011). this also makes their relationship so intense and oscillating. he never knows which randy he's going to get, the concerned older brother mentor checking up on him after their match or the unrepentant viper who rko's him outta nowhere and destroys his title match.