I assume it is because of a laggy connection. So the timer runs out, before the ygg works. Reboot the pc and close all tabs might help to get less lags if the pc specs are oldschool. Also of course try to get a better internet connection if it is not only ROJ. Another browser might help also. Firefox and Opera seem to be mostly faster with ROJ than others, if you only open one char. Guess it depends alot on RAM usage and for that Chrome seems pretty bad to me.
if it's world map boss, then it's been bugged since forever. You have to manually click the resurrection in the same spot (or something) or else, as you have pointed out, your char will spawn at the entrance portal of that map. In lab however, the auto-resu works.
have you tried enabling the "auto resu" and disable "auto play after death" in option menu?
I dont think I have issues using leaf with this method (except when its lag)