Scotland has Right to Roam legislation via its Land Reform Act that works pretty well (folks take advantage of it all the time in the highlands), that was an Act of the Scottish Parliament though and only applies to Scotland. The rules in England are not so open IIRC, property law is one of the areas that England and Scotland diverge in approach on a little, its fully devolved to Scotland. The Scottish legislation permits the general public to cross private lands such as farms so long as they respect the property, close all gates etc, don't damage crops and so on.
There have been some instances of abuse of the Scottish system, but its pretty few and far between.
Scotland and England have separate legal systems, hence the confusion - there is no UK wide standard answer on right to roam.
> https://www.heraldscotland.com/news/19459239.right-roam-work...