At 21w20a, I created a command to place a block after teleporting to the unloaded coordinates, but the block is not placed.
This was possible in 1.16.5.
To Command block
/execute in minecraft:overworld run tp @a 0.50 10.00 5000.50 0.00 0.00
To Chain Command block
/execute in minecraft:overworld run setblock 0 10 5005 minecraft:stone
So was this possible to do in 1.16.5 because in your affected versions you state 1.16.5 as a version in which this bug affects?