For me I think the reason Justin lost is that he isn't capable of being an out-fighter (pressing or defending) until late in fights; we've only seen glimpses of it in spots and when he fights like that he is nearly unstoppable (see Tony Ferguson fight round 5 for peak example of this).
Ultimately at his core he wants to surprise-blitz an opponent that is retreating/shelling or if facing someone that can bang it out he'll modulate to counter in spots if guys aren't good at leading. But to be a truly elite boxer-puncher (like Max) you need to be able to out-fight in spots and you need to be able to consistently use range-finding tools to set the pace/rhtyhm and disrupt your opponent's set-ups. You can't just be looking to constantly create "car crashes" with huge power shots that aren't built off combinations or feints without limiting your tools and making your timing somewhat predictable.
Justin is never able to really get in the zone to out-fight until super-late in fights it seems - the jab is like a non-existent tool to him until the end of the fight (Ferguson, Chandler, Fiziev, Max, etc.), it's like he's incapable of understanding the purpose of it even then and is using it for just damage instead of to actually out-fight.
Dustin has better boxing than Justin, but Justin has better boxing than Yair and he gave Max all he could handle for lengths of their fight. The reason isn't the boxing technique, it's they both took the fight to Max.
There are very few good back-foot counter-punchers in MMA, but Dustin is actually one of them. A less experienced Max on a short jump to 155 for the first time took the wrong approach for whatever reason and tried to employ his standard pressure-boxing style and just got ate up by power-counters.
But Max made adjustments after getting his ass beat and he won the 3rd in that fight and was well on his way to winning the 4th before he got his face split by that knee with a minute left (and he still had Dustin in a fully locked in anaconda choke at the end of the round), he was still able to make adjustments late and being measured with his pressure and drawing out counters to "counter-the-counter."
Max is just a more flexible fighter stylistically and had the better strategy/tactics from the jump. But in another universe Justin doesn't get his nose broken by that first spinning jump kick and who the fuck knows how the rest of the fight goes. Those strikes are so damaging they change fights to a level we can only barely feign to comprehend (unless you've ever gotten your nose shattered to pieces in the beginning of a world championship level fight).
Maybe he's able to make those adjustments he made in the 4th way earlier and actually put more damage on Max earlier. Or maybe it just leads to another adjustment from Max like he ended up doing in the 5th anyways lol.