I don't think it should be that hard to fix this, and it definitely is a BIG issue for map makers
The only "solution" i have found to this, is when you summon a mob, to first teleport it close enough to the player so the regular follow_range of the mob can detect the player, and only then, teleport it back to where it should be. It is still tho quite a problem, since it involves either the player to see the mob teleport, or even more commands including invisibility, and armor/hand item management, to prevent the player to see the mob teleport. Resolving this bug would make all of this useless once for all.
by the way i also tried to put this following command :
/function #minecraft:tick
In a repeat command block, still don't work
so this is a 1.12 changement because it worked in 1.11
It is simply because diamond and redstone generated up to layer 15, not 12.