How to list all (including transient) dependencies of a package with dnf correctly?

Basically, you just need to set up a shared DNF cache:
Lazy or caching dnf mirror recommendations? - #3 by vgaetera

DNF can be forced to use this cache in offline mode:
dnf5: DNF5 Package Management Utility | dnf5 System Administration | Man Pages | ManKier

It works even without creating a local repo.