Press Command-Control-Esc (Escape) to stop screen recording on Mac when using QuickTime.