im glad i could help!
Found the bug! It appears that the dragon tries to reach the player but gets stuck somehow, don't know why and how. Thanks again for spotting the bug!