Define your terms. Backtracking is defined in the Prolog specification so you'll need to define "flattening".
In essence, thinking of the computations performed as if logged on an infinitely long tape.
Now, an immutable tape without overwrites is at best a finite automaton, but giving it the ability to replace tokens — which we have and can do — gives us an interpreted tape that — in a very handwavey manner and if you really squeeze your eyes — resembles a Turing machine.
So backtracking could be simulated by an LLM, no?
Is there any “difference” under these conditions up to what an LLM can approximate?