See https://github.com/spring-projects/spring-security/pull/8996#issuecomment-746312303