I've always been sceptical of the recent attempts to rehabilitate James II, as opposed to simply reject the most outlandish pieces of protestant propaganda.
Absolutism might not have been the end goal but James showed an authoritarian streak and a tendency to govern by decree that only grew throughout his reign.
Moreover, both I and the folks at the time would probably have been far less sceptics of his intents to simply achieve toleration had he deployed the same kind of effort to achieve a similar status to the disident protestants then he did with the catholics (TBF he did make some efforts for the dissenters but it paled in comparaison). By not doing so he not only forfeited a good occasion to expand his base of support but coloured his efforts as mainly aiming to improve the status of the catholics at the expanse of non-dissident protestants, with no guarantee that he would stop at simple equality.
Both tendencies led to much of the ruling classes of England and Lowland Scotland (most of the resistance to the Glorious Revolution in Scotland where centered in the Highlands) to believe that James was both trying to, at the very least, return to a pre-Civil War balance of power between parliament and the monarchy and to help catholicism recover what it had lost since Elizabeth I. We can debate wheter those beliefs where accurate but its pretty easy, IMO, to see how James actions would have helped them spread.
At the end of the day James II had only himself to blame. The restoration of the monarchy with Charles II was based on a series of understandings, both explicit and implicit, and James actions putted said understandings back in question, thus leading to the Whigs and a sizable chunks of the Tories deciding that they not only should but had to react to save their power and possibly their heads.
It was never justified. James II was the rightful king and his son James III was the rightful Prince of Wales. James II should’ve been more resolute in exterminating the Whig threat which he was warned of by his advisors and Louis XIV numerous times.
Considering the role his excessive repression of the Montmouth Rebellion played in trigering the Glorious Revolution I'd go on a limb and say that such a policy would only have lead to an earlier Glorious Revolution and less Jacobites to support a restauration afterward.