Currently autotargeting only works if a template is moved by the user as getTargets is only called in _onDragLeftMove and activatePreviewListeners if I've looked correctly.
When a template gets moved by a script/module(like token attacher) these functions don't get called.
This can be solved by hooking into updateMeasuredTemplate and call getTargets if the update data contains x,y or rotation.
This might not be desirable for every user so it might make sense to add an option to enable or disable this.