There’s a bit of a tricky problem for GWR to solve here, and you have been overcharged, but journey time alone should not be used for charging - what happens if your train is delayed or you get to Cheltenham early and have a significant wait for train.
Quite.
The paradigm for PAYG is that you touch in at the start of your journey, and effectively promise to pay for it, and at the end of your journey you touch out, at which point the system works out the journey you made, the fare due and charges you (however this is done). But only at the end is the journey defined, as to start, finish and route. Unless an intermediate touch is made, then it just has to make an assumption as to the route you took, and so the fare due.
Two things following from this:
(i) for the Cheltenham-Swindon journey in question, noting GWR's statement that you will be charged the best fare, unless they can from timetabling, train running data and tap times reliably determine which route you took (which is non-trivial, especially as a quick look shows trains via the different rotes at similar times), they should always be assuming you travelled via Stroud, and charging on that basis.
And (ii) passengers sometimes make illogical choices of journey, both as to start and finish (the London Catford-Catford Bridge springs to mind), and as to route - is CHM-SWI via Bristol and Bath sensible? or what about Cheltenham to Yate via Swindon and Bath? With a pre-bought ticket system, the railway can not sell tickets for such journeys, but with PAYG it doesn't have that option... So what should the system do when someone makes such journeys? Which needs to be thought about at system specification and design time - but perhaps there was an assumption that people would just make 'expected' journeys. As someone said, it is hard to make things foolproof, because fools are so ingenious...