Darrell, as everybody has told you, this behavior is not normal <s>.
So you have to pare back the problem until you find the case.
Run the program below. Pressing F9 will simulate an "end of program" activity from your menu, where the application does not end, and shutdown should work as normal if you really want to quit. darrell.scx doesn't do anything, it's just marked modal.
You should see the results you want when you shut down or press F9.
Now you have to add in the elements of your program and figure out what's different and causing the issue, a piece at a time. It's probably some member reference, but we won't know until you isolate it.
>L<
ON SHUTDOWN DO EndApp IN darrell WITH .T.
ON KEY LABEL F9 DO EndApp IN darrell
ox = CREATEOBJECT("myform")
ox.SHOW()
READ EVENTS
DEFINE CLASS myform AS FORM
AutoCenter = .T.
ADD OBJECT x AS COMMANDBUTTON
PROCEDURE x.CLICK
DO FORM darrell
ENDPROC
ENDDEFINE
PROCEDURE EndApp(tQuit)
FOR i = _SCREEN.FORMCOUNT TO 1 STEP -1
_SCREEN.FORMS[i].RELEASE
NEXT
CLEAR EVENTS
ON SHUTDOWN
IF tQuit
QUIT
ENDIF
ENDPROC