In 1.16, it was possible to synchronously select an entity in the same tick that the chunk it's in is loaded. In 1.17, this is no longer the case.
This can be reproduced with the following commands in a function or using chain command blocks:
execute positioned 1000000 0 0 run forceload add ~ ~
summon minecraft:armor_stand 1000000 0 0 {Tags:['test']}
say @e[tag=test]
The final command no longer will select the entity in 1.17. Scheduling the final command requires a delay of a few ticks (usually between 2-10) or else it will not select the armor stand.