First, I think a better understand of what your trying to accomplish and why may be needed. What you are trying to do by ultimately refusing the Head-On engagement is gain separation from the bandit so as to acquire the necessary turning room between you and the bandit, so that as you merge, you can Lead Turn around him and onto his 6.
If you change your heading left or right, off of the Head-On aspect, this is trying to gain 'lateral' separation. Seeing this the natural instinct of any bandit -- often with knowing why -- is to turn back towards you to recreate the pure Head-On merge, and thus deny separation until you acutally pass each other, usually with someone getting a face full.
If you try to dive under him you are going for 'vertical' separation, which is the better choice. However, do it too soon (which may be your problem) and/or stay straight on your same heading as you do it, and he can possibly follow your movement downward long enough by going nose-down himself, to shoot you before you pass under.
Anticipation and timing in properly avoiding the HO and setting up for a Lead Turn is everything. Appear to offer the level Head-On engagement at first, keeping your speed well up (you will bleed some off as necessary in a few moments). Do everything to make him think you are a HO monkey looking for a free, ripe banana. Just before or as you reach 1000 ft. range from him, dive for about 500+ ft. of separation. You may not get that much, and you don't want to dive too steeply. Remember range will close extremely fast in the Head-On so don't be late. 1000 ft. is a guesstimate where most HO dweebs just start to fire.
As he is thinking "Shoot! Shoot!" to himself, he will no doubt push is nose down to stay on track and fire a burst. Most likely your surprise move, done at the right moment, will not allow him to fully counter the dive or recover a good tracking shot, even if you stay straight in your dive.
However, as EXACT timing is sometimes a problem (the bandit doesn't always cooperation waiting to shoot when you think he should) I usually put in a little jink in my flight path as I dive and approach. Just the smallest bit of bank angle and/or rudder wiggle just to bring me a couple of degrees off that straight on heading, but still in the same basic flight path. This causes him to further shift his nose in yet another dimension to stay on me, while I pass underneath. Very difficult.
After I dive, I watch the bandit until I see the range flash to about 400 ft. then I pull up hard the instant before we pass, into a loop (either an Immelmann or Pitchback, depending on what he does) before he can react, thus gaining the 'Lead Turn' advantage on him.
What happens to him is, he so focuses on getting that HO shot, even diving to stay on me as I go under him, that two things result.
1. He GAINS airspeed in his dive (as I do unless I've carefully managed the throttle as I should) which means he cannot do as tight a turn at the same moment as I can without first bleeding some airspeed and,
2. He so concentrates for the HO shot that he doesn't plan ahead nor react quickly to starting a Lead Turn of his own until I am well into mine.
Now, if going straight and true directly under him (or doing it too early) still gives him too much of a fair shot as he counter-dives, I suggest instead of the little heading jink I mentioned before, pull up and over into a half or even full barrel roll as you approach him.
Don't do a tight aileron spin right in front of his guns, but a small diameter roll-around his Plane of Motion. I guarantee he cannot follow that for a shot. As you finish the roll you should be passing him and you then pull around on his 6 as before.
The additional advantage of adding the barrel roll is it reduces your speed more quickly (so start the whole sequence with good speed) just before you go into the Lead Turn. And in following you nose down, then up or maybe left or right for his shot as you roll, the bandit will even more not on-the-ball for a Lead Turn of his own. He may even lose relational orientation with you for a moment, and need to recover that before he decides his next move. Even nano-seconds are all to your advantage in the thinking battle of combat that is called OODA.
Early angles through deception, separation, speed management and Lead Turning can be gained on the bandit by this whole maneuver.