KeyCloak 19.0.1: KC_* Environment variables are ignored

Check the guide here:

If there is a little tool icon in the right column of the table, that is a property that must be set in the Dockerfile before running build. As you have observed, there are some legacy vars that can cause unexpected (or, in your case, expected) behavior, but the guide in the link is how things are supposed to work in the future.