Well, part of the alcohol evaporates with the cooking. Not all.
And it's the cooking time (not the temperature) that makes the difference. If you cook something with alcohol for an hour or more, it's gonna have much less alcohol. But if you cook it for a just a few minutes you won't be rid of much.
I've heard very often that myth, and anyone who has even drank a
queimada knows it's not true.
A
queimada (lit: burned) is a typical beverage in my country. It's made with an usually-homemade (and VERY strong) liquor called
aguardiente (lit: fire water), sugar and usually a pinch of lemon/orange and coffee.
Then we burn it.
Yes, we burn it. Like this:
The queimada is part of a tradition which includes doing it in the dark, while reciting an incantation to keep the evil spirits away. So it really burns for a while.
The pottery for making it and also for serving must be high-temperature resistant. Yes, it's still burning while it's served!
And know what? After all that burning, it's still an extremely alcoholic beverage.
So, no, cooking for 10 minutes does not get rid of much alcohol. It just gets rid of the aftertaste.
When I visisted Holland I was surprised to find classic liquorice so readily avaliable. We bought it in some market stalls. (I don't love it, I eat a bit and that's it.)
Here it's not easy to find.
Usually you just find the sweet candy one, and not nearly as often as the red one anyway.