Thanks to @Sweeper for digging it out. Here is the original bug report:
https://bugs.openjdk.org/browse/JDK-8282129
So the change was released with Java 19, and it is in fact mentioned in the release notes: https://www.oracle.com/java/technologies/javase/19all-relnotes.html
From what I gather there, there is no feature flag for it because the bug's compatibility risk was classified as "low", due to the following opinion:
The existing behavior of the \b metacharacter in Java regex strings is longstanding and changing it may impact existing regular expressions that rely on this inconsistent (with respect to Unicode characters) behavior. However, the use of \b is less common and code that focuses on ASCII-encoded data or similar will be unaffected.
So effectively everyone who depends on the old (admittedly inconsistent) behavior will have problems to deal with :-/