I tried to gather some informations:
and I'm guessing a bit.
All those sources lead to this conclusion:
Logback initially introduced Joran, a configuration engine that could read XML files - the legacy format.
In Logback version 1.3, Joran was substantially changed. See 2021-07-28 Release of version 1.3.0-alpha6:
Joran, logback's configuration system, has been rewritten to use an internal representation model which can be processed separately. As a side effect, logback configuration scripts are now largely order-free.
This probably led to a change in the XML configurations and depending on the features you use in your logback configuration you might have to convert to the Canonical config when using 1.3.x or 1.4.x of Logback (of the two versions you need version 1.3.x if you want to work with Java EE and 1.4.x if you want to work with Jakarta EE, otherwise they should be equal).
Then Logback 1.5 came and supports configuration in code. To convert existing XML files into code, Tyler was released. See 2024-02-28 Release of logback-tyler version 0.1:
Logback-tyler translates logback-classic XML configuration files (logback.xml) into Java.
Disclaimer: As I think it is a pity that the differences are nowhere documented in a comprehensive way, I just tried to do this here, although I am not very deeply involved into Logback and not even using it regularly