SHOULD+HAVE+PAST participle

hello everybody, what can be a meaning problem students may face when teaching the structure:

“He shouldn’t have insulted the policeman.”

How can they get confused?

Thank you

“He shouldn’t have insulted the policeman.” = He insulted the policeman. He was under an obligation not to carry out such behavior.