not obviously the case. natural language also has tree/dag structure yet transformers do okay with it. encoding higher order structure in linear sequences seems necessary for transformers to be able to do most anything
The old joke about 1 + 1 = 2 being on page 360 of Principia Mathematica still largely holds.