It's circumstantial, Dan.
I've had basically the same experience with the P-38G, but only this time, I was the Ki-84. The P-38G started out a little bit higher, but the situation after the first merge was about equal. After a few jabs at each other the fight quickly developed into a rolling scissors, which the P-38 gained the upperhand at the initial stages.
It went into the familiar "wing-over" move, which usually the USAAF planes does better than any other plane in AH - pitch up high, and then engage max flaps possible, and 'c o c k' the nose down very quickly and start a loop fight.
Since most USAAF planes have combat flaps, it can finish that move quicker than any other plane in the set.
Once an enemy plane tries to follow that move, it inevitably enters a 'sluggy' phase which it is also trying to tilt the nose down to follow the US plane, but can't do so. The P-38 does it even faster than others, because it's got no torque to manage during the nose-down process(incidentally, this also usually the point most P-38 pilots experience the accelerated stall, when they push the limits too far).
By the time the following enemy plane gets his nose down and starts moving downwards, the P-38 already made the bottom of the loop and is on its way back up. In about one~two vertical circles, the P-38 will 'outturn' the enemy plane decisively.
I'm pretty much familiar with that since most good US plane pilots use it to maximum efficiency. Therefore, I thought if I could make it through the first 'wing-over' without getting shot at I'd win - and things did turn out that way. Once I made it through that critical point, my own superior two-stage fowlers on the Ki-84 kicked into action and after that, everything was a breeze.
Eventually the P-38 gave up the vertical fight and tried to run away - except the Ki-84 is much faster than the P-38G. No thanks to my superiorly inferior gunnery, I failed to shoot him down through his desperate scissors and rolls, which I had no problem whatsoever following.
He even tried a super-slow speed turn, probably near 90mph or so, with multiple stages of flaps engaged. Piece of cake - once the Ki-84 flaps are out, the plane literally turns itself on a dime without much of pilot input on the stick. About 2 more seconds was all I needed until I finally had a decisive gun solution at 150 yards distance, when out of the blue an enemy plane came by and shot my tail off.
Granted, the P-38 pilot could have been mediocre, but I'm a mediocre guy myself. If specs mean anything, everything is in favor of the Ki-84 when compared to a P-38. The only thing the P-38 does better is have better guns and run away faster - which the latter applies to only the PJ. The PL and the Ki-84 has same top speed at deck.
Ofcourse, there is a small but very vulnerable speed range for the Ki-84, about 50mph speed margin before the flaps can be popped out - this is where the Ki is the most sluggish, unresponsive, and unstable. No doubt, an experienced P-38 pilot can fully exploit this weakness.
But given equal conditions, when comparing the strengths and weaknesses of each of those two planes the Ki-84 holds most of the better cards, at least, as a pure 1vs1 dog fighter. Everything the P-38 can do, the Ki-84 can do it better.