Why were the results different?
DOJ composition running up through 2018 was pretty strongly influenced by a decade of liberal-leaning but cross-partisan staffing, and this was a legal theory that obviously emerged from within staff rather than coming down from the top.
And psychology of liberal or conservative but principled lawyers is likely to be conscientious enough when it comes to their legal theorizing that except where it serves particular organized power plays, you'll see some principled arguments come out, like this one, because obviously the DMCA exists to protect copyright rather than stymie repair.
Also, right-to-repair has an appeal that crosses partisan boundaries very well, especially among voters themselves. Sure, businesses and social influencers who'd sacrifice right-to-repair for pro-capital / power-play positions are probably highly represented and influential in the right-wing party, what with the investment in social philosophies oriented around hierarchies of status. But going against right-to-repair is still unpopular enough and likely to piss off conservative-identifying libertarians that there was bound to be some discomfort, even with the usual Republican enthusiasm for being a pro-capital / pro-business capture party.
And finally, while it's obvious that the 2018 POTUS is only capable seeing the issue in terms of friends/opportunities and enemies/liabilites rather than principled legal or social theories, it's also obvious that right-to-repair is one of the things that benefited from his shall we say limited range/depth of interest when it comes to policy. Inattention can allow any number of things to thrive. At least until someone offers to buy right-to-repair off of him. Elections matter.