The change you linked is about the fix for
https://gitlab.com/freepascal.org/fpc/source/-/issues/35671, which according to multiple reporters is in fact rejected by Delphi. It is possible the change also caused the error you are seeing at the same time, but that was not the purpose of that change.
There is, however, also the fact mentioned by nanobit that assigning out-of-range values to enums is not and never has been supported by FPC, because if it were valid then we could never perform any analyses based on the declared type of any ordinal variable (only based on their size). I know what you posted works with Delphi's code generator and that there is a bunch of code that relies on this, but it's a rather fundamental design issue (and philosophy) that cannot be addressed by just disabling one or two random optimisations in FPC (as gets suggested from time to time).
That said, Sven's program compiles for me on main without even a warning when it's changed to Delphi mode (unlike in 3.2.2, where it does print a warning about the out-of-range constant; that seems like a regression). So, like they asked: please (always) post a full example that can be used to reproduce the problem you're reporting.