Magit’s author suggests that the problem could be related to the built-in transient.el being used instead of the one contained in the elpa-transient package: https://github.com/magit/magit/discussions/5441#discussioncomment-14408198