Checkout code error: reference is not a tree

We keep getting the same error during the “Checkout code” step since this morning

git version 2.36.1
Cloning git repository
Cloning into '.'...
remote: Enumerating objects: 3750, done.        
remote: Counting objects: 100% (531/531), done.        
remote: Compressing objects: 100% (217/217), done.        
remote: Total 3750 (delta 368), reused 396 (delta 297), pack-reused 3219        
Receiving objects: 100% (3750/3750), 993.33 KiB | 19.87 MiB/s, done.
Resolving deltas: 100% (2051/2051), done.
Fetching from remote repository
remote: Enumerating objects: 168, done.        
remote: Counting objects: 100% (168/168), done.        
remote: Compressing objects: 100% (74/74), done.        
remote: Total 168 (delta 96), reused 156 (delta 84), pack-reused 0        
Receiving objects: 100% (168/168), 134.68 KiB | 722.00 KiB/s, done.
Resolving deltas: 100% (96/96), completed with 20 local objects.
From github.com:liftedinit/many-framework
 * [new ref]         refs/pull/242/head -> origin/pull/242
Checking out branch
fatal: reference is not a tree: 42afa3319c2acc131b7cdb48aa1b4d77c4032a18

exit status 128

It’s happening on multiple PRs.
Thoughts?

Edit: We just merged a PR in main and we don’t get the error when running CI on main. However, we still have the error on PRs.