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