Yes but no, you still [execute "as" @a] and have the coordinates of @unknown given for they are supposedly taken from the entity executing the command and not from the world spawn unless someone intentionally tempered with that... That means if your claims are true and thats correct it means the Worldspawn executes the function instead of the player only using the player as an entity cover which is a problem in itself and should be treated as a problem too imo since that dues to inefficient coding and minor issues in complex datapacks (Its not the first time I have to overspecify when using ~ ~ ~) So yea please at least try to change sth there so others dont get dumbfounded like I did
Can confirm for 1.21, also for Custom Enchantments using said perk (/Attribute one works however)