Flaky test spec/features/commits_spec.rb#141 when accessing internal project with disallowed access

Job https://gitlab.com/gitlab-org/gitlab/-/jobs/980986943 from the removal of the feature flag graphql_pipeline_header MR here: !52247 (merged)

Failures:
  1) Commits CI commit status is Ci Build when accessing internal project with disallowed access is expected to have text "John Doe122"
     Got 1 failure and 1 other error:
     1.1) Failure/Error: expect(page).to have_content pipeline.sha[0..7]
            expected to find text "b83d6e39" in "Page Not Found Make sure the address is correct and the page hasn't moved. Please contact your GitLab administrator if you think this is a mistake. Search Home Sign out and sign in with a different account Help"
          # ./spec/features/commits_spec.rb:151:in `block (5 levels) in <top (required)>'
          # ./spec/spec_helper.rb:325:in `block (3 levels) in <top (required)>'
          # ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
          # ./spec/spec_helper.rb:316:in `block (2 levels) in <top (required)>'
          # ./spec/spec_helper.rb:312:in `block (3 levels) in <top (required)>'
          # ./spec/spec_helper.rb:312:in `block (2 levels) in <top (required)>'
     1.2) Failure/Error: raise JSConsoleError, message
          JSConsoleError:
            Unexpected browser console output:
            http://127.0.0.1:45731/namespace43/project43/-/pipelines/14 - Failed to load resource: the server responded with a status of 404 (Not Found)
          # ./spec/support/capybara.rb:172:in `block (2 levels) in <top (required)>'
          # ./spec/spec_helper.rb:325:in `block (3 levels) in <top (required)>'
          # ./spec/support/sidekiq_middleware.rb:9:in `with_sidekiq_server_middleware'
          # ./spec/spec_helper.rb:316:in `block (2 levels) in <top (required)>'
          # ./spec/spec_helper.rb:312:in `block (3 levels) in <top (required)>'
          # ./spec/spec_helper.rb:312:in `block (2 levels) in <top (required)>'

Another expectation that might fail is this one on line 153

expect(page).to have_content pipeline.user.name