Macros that have local variables don’t work inside functions. So DoOnce nodes don’t work inside functions.
Having said that, it should be impossible for the End Hover node to ever trigger. No mouse click or tick or anything can ever make it trigger inside the function you posted. It’s being called elsewhere unless they changed how local variables work inside functions.