[TS] Fix CI when we log while the browser is shutting down