For now fixed it by wrapping debug in waitFor:
await waitFor(() => { screen.debug(undefined, 10000000); });