Thank you for reporting this issue, and sorry to hear you're experiencing this hang when quitting. Needing to restart is pretty severe. To help us investigate this issue:
Do you also experience this issue with the latest release version of After Effects? After Effects 22.4 was released yesterday.
What are your system specs e.g. OS version, RAM, GPU, language settings?
When After Effects (Beta) hangs on quit, can you force-quit or otherwise close the frozen application? If so, does the Crash Reporter come up and prompt you to file a report? If so, please do so and let us know what email you use so that we can track down the report. That will be a big help in shining light on this issue.
How does After Effects (Beta)'s hang affect the rest of the system? E.g. Does the system lag overall, does the whole system freeze up, or something else? Please describe why you are needing to restart the whole system.
Thanks for reporting this issue and for any further information you can provide,