The core rules of d&d (mechanics but not settings) are available under a free license (it was the Open Gaming License, or OGL, although I have a feeling it’s a different license (Creative Commons , maybe?) now following the backlash from earlier this year when Wizards tried to scrap the OGL and replace it with a worse license)
Pathfinder was originally based on the d&d 3.5e ruleset. I’m not sure how far it has diverged from that, as I’ve played neither. Solasta is based on d&d 5e (the latest version of the rules), but is in a non-d&d setting of their own creation. BG3 is also based on 5e (although less strictly than Solasta), but also has the D&D license, so can use the Forgotten Realms/Sword Coast setting
Personally, I enjoyed Solasta, and think it’s a great representation of combat on 5e. The writing and story aren’t amazing, and it lacks the crazy amount of freedom/choices of BG3, but mechanically, it’s a great implementation of 5e rules.
Tory originally came from an Irish word meaning robber/outlaw. 350 years on and they seem to be attempting to live up to it.