No I get it, DS2 is very much like that as well. DS1 used to do it to an extent but he wouldn't quite be so much on his own planet, he would just get into this very silly state where he wouldn't know where to stop and would seem to want to wind me up. Someone many years ago on MN explained to me the term dysregulation, which is exactly what it is when they are doing that, for DS2 he gets into a dysregulated state when everything builds up to be too much - this would be things like hunger and needing the toilet (which he doesn't recognise on his own) and sensory overload but also boredom and things being unexpected/not being able to predict what happens next, and being asked to do something that he doesn't want to do/doesn't understand/doesn't see the sense in, and emotions (frustration, surprise, embarrassment, disappointment, excitement). All of these things could contribute in small ways and build up to a point where he just almost dissociates and goes off into his own little world and if you try to talk to him, his responses won't make any sense or won't bear any resemblance to what you're saying. And if you push back more or if he's doing something unacceptable in the course of his being on his own planet, like singing so loudly nobody else can hear themselves think, then it seems to activate a destructive urge that will override common sense and anything else.
When he's in that kind of state there is no sense in trying to talk to him and what I would do ideally is steer him in the direction of home as quickly as possible. If I could take care of the branch while keeping both children safe then I would do it myself, but if I couldn't then I would have to just leave it and possibly shout an apology back to the people behind us. I have stopped bothering to do the performative asking him to pick it up because I know other parents would expect me to do that and consider me lax or selfish for leaving it behind, because there is literally no point - he will not do it, asking him to do it will just delight the imp of destruction that lives on his shoulder in moments like this and drawing attention to things like having left a branch in the middle of the pavement will escalate everything and possibly make it more likely that the imp will choose something like that the next time he goes into this mode. Ignoring and pretending not to be at all surprised or bothered about it is more likely to mean he will not choose it next time.
If going home is not an option, then I would instead try to steer him to a calmer/quieter place where I can hopefully offer him some kind of food/drink/clothing adjustment and possibly get him to use the toilet or we can just wait boringly until he chills out a bit. If he had managed to calm down, then I might be able to explain about the branch being in people's way, and then he might be open to either moving it himself or waiting while I move it, if someone else hasn't done it already. But either way, I would be on high alert for the fact even if he has come down a bit from the threshold where he goes into la-la land, he could easily shoot right back up there again. And I do a lot of this pre-emptively, so we don't do a lot of long outings, or going to busy places, or attending events or activities which happen after about 3pm. After school is still a crap shoot whether he will be bolting off doing god knows what or whether he'll talk to me nicely (or scream and shout at me 🤷♀️) and he finishes school at lunchtime. I don't feel like a failure about it any more because I know what's going on for him but I definitely did for a long time (by which I mean, if you feel like a failure, please don't). And I've just sort of accepted the fact that 90% of the school/nursery parents and staff probably think I'm a totally hopeless parent and annoying person. Luckily I do have friends who get it, and some staff members get it.
BTW don't wait for school/nursery/etc to suggest neurodivergence. They do not do this IME. None of the children's schools/nurseries have done this. Even when I asked outright with DS2, two separate settings/three different staff members said oh no!!!! Nothing like THAT!!!
I swear he is the most extremely ADHD child I have ever met. But I suppose it's only become obvious that was the case as he's diverged more from his peers - he used to be simply one of the more rowdy or odd children in the group, but as the other children started to develop things like attention spans and ability to regulate emotions or stop and think before acting, he just hasn't developed those things at all making it much more starkly obvious there is something going on. But I don't know if we would have got taken seriously apart from I had my own and my older child's diagnosis to wave at them saying helloooo, family history. He was about 5.5 when I asked for the referral and 6.5 when he was diagnosed.
The example convo in the screenshot I would imagine that child is at least 10, and it's not an especially realistic example anyway. There is a podcast, which has some better examples on it although they often are hypothetical because it is a phone-in radio show made into a podcast. You haven't said how old your DS is but I would guess maybe 5 ish? Based on the fact you said 3 was hard (suggesting he's not only just 4) and he is in school but is still in a car seat which is harder to escape suggesting probably not a high back booster yet. You couldn't have that kind of convo with a 5yo, even a very mature one. And if your child has a reduced attention span or gets dysregulated easily then no chance - they would need to be much older.