Well maybe you should not let the encoder automatically decide the level but set a hard cap yourself.
You can always download the h.265 spec from here:
https://www.itu.int/rec/T-REC-H.265-201911-I
and check the level limits for a certain level. Then configure all relevant parameters of your encoder to match a specific level and set that level at the encoder so no magic things that are not wanted happen.