I'm not knowledgeable on patch creation. But here are the changes I made to fix this issue:
In the patch above, I had to remove the lines:
class: Drupal\user_ref_field_cache_context\CacheContext\UserReferenceField
- arguments: ['@current_user']
In the file /src/CacheContext/UserReferenceField.php:
60c60
< $current_user_id = \Drupal::currentUser()->id();
---
> $current_user_id = $this->user->getAccount()->id();
62c62
< $user = $this->entityTypeManager->getStorage('user')->load($current_user_id);
---
> $user = $this->entityTypeManager()->getStorage('user')->load($current_user_id);