test: improve error-on-next-codemod-comment flakiness (#97553)
example failure:
https://github.com/vercel/next.js/actions/runs/32246702678/job/96048986756?pr=90300
datadog:
https://app.datadoghq.com/ci/test/runs?query=test_level%3Asuite%20%40git.repository.id%3A%22github.com%2Fvercel%2Fnext.js%22%20%40test.suite%3A%22app-dir%20-%20error-on-next-codemod-comment%22&agg_m=%40duration&agg_m_source=base&agg_t=avg&fromUser=false&index=citest&viz=stream&start=1786535051579&end=1787139851579&paused=false
1. Use the callback form of `patchFile` for automatic and more robust
cleanup
2. Longer `retry` duration in case HMR is slow on CI