HHH-12508 is not a regression, but can cause SessionFactoryOptions#isSecondLevelCacheEnabled to return true when the second-level cache is actually disabled. Hibernate relies on the correct return value when determining if second-level cache functionality is available.
HHH-12520 is a regression introduced by HHH-10418. CacheImpl#getSecondLevelCacheRegion can cause NullPointerExceptions when the query cache is disabled.
The test case included for HHH-12508 is for both issues.