Problem occurs in Mac but not on Windows 10. Routines after loop do not appear and experiment ends without error

OS (e.g. Win10): Win 10 works fine, Mac does not!
PsychoPy version (e.g. 1.84.x): 2020.2.10
Standard Standalone? (y/n) If not then what?:
What are you trying to achieve?: for the experiment to run just as it runs in windows
The routines after loop do not work in Mac but work perfectly fine with Windows 10. The routine “end_text” only has a simple text component.

What did you try to make it work?: tried a different version of psychopy but didnt work

What specifically went wrong when you tried that?: There was no error message but experiment ends abruptly. There may be a warning or error similar to “ApplePersistenceIgnoreState: Existing state will not be touched”