Yes I am not encouraging fare evasion, just making it clear that it is completely valid to change trains on a ticket prohibiting break of journey while traveling along a permitted route - where relevant it is also permitted to go outside of the barriers to access station facilities (such as water refill points or toilets).
Fare
avoidance is probably the best way to save money in this case. That is, actually go to Lancaster and back, ideally sorting a very cheap Northern Advance back to Preston on the Cumbria train, these are often offered. On the way back the restriction is not in place.
The other way you can
avoid, rather than evade, the need to pay the Anytime fare for this journey in the evening peak, is to travel on a train that stops for both pick up and set down at Milton Keynes Central (or change there) and split tickets there, as tickets north from there do not have evening restrictions*. This might be better time wise than going to Lancaster and back. Preventing people doing this is one reason a lot of Avanti trains have a set down restriction at MKC in the evening peak (though it's also to prevent them being crammed out by commuters) but unless speed is of the absolute essence there are plenty of options to avoid this restriction wholly within the rules. This is more use for Manchester than Preston, though, as the fast Scotland trains don't call, though you could do it by using a Liverpool service and changing at Crewe.
* Technically they have the same restriction code, so some more awkward staff might argue that means if you actually board at Euston the split also isn't valid, but that's not conventionally how split restrictions are done. The best advice is probably to ensure you book your split via an accredited splitting site with that itinerary, and then nobody can really argue.