He buries his head because he wants the time he has with her to be positive. Yes, it’s short-sighted. The girl is begging for adult attention and discipline and she’s letting the adults know she’s going to do what she wants. You are right to be concerned. But he’s terrified that he won’t even get to see her a couple of times a year if he lays down the law during visits.
If she is fine at her mother’s house but only acts up when she is with him, then the problem is in the father-daughter relationship. But if she is also a wild child at her mom’s, things are much more serious.
You didn’t mention whether he and his ex are cooperative about how they are raising their daughter. If so, the best kind of help you can lend is to encourage him to to work with the girl’s mother to develop some consistent rules and discipline. If she’s generally a good kid and the problems only come up when she is visiting your boyfriend, then he could decide to do some reading or talk to a professional about how he can have a positive influence on her.
I see no reason why this should come between you. Since the girl is only with you a couple of times a year, the best thing you can do is keep hands off. You can’t correct her if her parents won’t. All you can do is calmly insist that he require her to talk to you with respect when she is there.
If the issue is that you can’t respect someone who can’t parent, that’s another matter. You owe it to him to tell him so. You can’t make him do things differently. You can decide if the relationship is worth putting up with a few days of teen angst and sullenness now and then.
I wish you well.