Is the $UD_uszi_belepesRun also declared at the start of your script? Then you have declared it twice, remove the declaration in the function.
(KP_VJ_vasarlas() does not set its own flag to false at the end of the function)
Func UD_uszi_belepes() ;function that starts to run
Local $StartFileSelectFolder = FileSelectFolder("Adja meg az UD_uszi.exe MAPPÁJÁT!", "")
Run($StartFileSelectFolder & "\UD_uszi.exe")
Sleep(3000)
WinActivate("UD ÜSZI")
ControlSetText("TLoginForm", "UD ÜSZI", "TEdit2", "BALAZSGE")
Send("{TAB}BALAZSGE")
Sleep(50)
Send("{ENTER}")
$UD_uszi_belepesRun = False ; Remove The Global from this line
EndFunc ;==>UD_uszi_belepes