In ISPF, entering '=X' is a fast path to exit. You would end up at the TSO 'READY' prompt and would still need to enter 'LOGOFF'.
You may be able to specify a COMMAND ===> option on the LOGON screen. If you specified 'LOGOFF' as the command it will be automatically issued when you exit ISPF.
Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.