If you could post some more code that would help.
First thought - is it ending or is it crashing?
Normally a gosub looks like this
label:
<Insert code here>
RETURN
Say you want to display a menu but then leave the subroutine when the user clicks on a button then if that event (the using clicking start) results in a variable "start" being set to 1 then you want something like this
menu:
start=0
<display menu here>
REPEAT
<stick your button clicking code here to detect the user clicking start button then set start=1>
UNTIL start=1
RETURN
This way the routine will wait in the subroutine then when start=1 leave the repeat/until loop and return to where ever it was when you did GOSUB menu
IF you have a line like
if Mouseclick()=1 then return (you dont need the outer brackets)
in place of my RETURN line then unless the user is pressing the mouse button at the moment that line executes the program just carries on without returning and will probably start running the next subroutine/function or just stop if its the last line of code.
So I think your problem is probably that your not waiting for a mouseclick just checking once.
If thats right and you just want to wait until the mousclick event then you could just do this:
menu:
<display menu>
REPEAT:UNTIL mouseclick()=1
RETURN
Theres probably another 100 ways of doing that though.