You can do something like that, but there are some things to consider with your code's structure:
First, if I understand your problem correctly, you want the enemy to move in the player's direction first when loading the level, but you don't want the enemy to pursue the player.
To do so, I would recommend to:
I'll record a short video to show you how and post it here.
There you go! Your answer in video: https://gdquest.mavenseed.com/lessons/making-the-enemy-move-towards-the-player-at-the-start" target="_blank">https://gdquest.mavenseed.com/lessons/making-the-enemy-move-towards-the-player-at-the-start