Fix flaky test TestJSONFormatProgress (#21124) Upstream-commit: c5aedcdac9c30e764c22d1be1dd2c08c52c74fcc Component: engine