postgres=# create temporary table mytemp2 (like mytable including all);
ERROR: unexpected varattno 2 in expression to be mapped
I would be happy if this bug could be fixed in a later release (provided that it has not already been).
We have release notes that describe what gets fixed in each minor release (for you there is only one relevant one right now). The notes for 12.3 seem promising but you could just install it and confirm it yourself.