Fix failing upgrade test in CI (#20357)