Au contraire, I think JetPack is exactly the problem.
JetPack is broken by design for "normal" publishing and should imho never be used for such a use-case.
It should at most be used for ad-hoc testing specific commits or branches and even then there are often preferable options.
Besides that it is broken by design, it is slow, might fool the build tool, and unreliable.
It behaves even worse in case of multi-project builds.
And besides that, it also manipulates the generated Metadata after it was generated, and often does it in a bad way, especially with Gradle Module Metadata.
As you can see, it replaced the coordinates of the main artifact, but not the ones for additional variants like the test fixtures and thereby breaks the whole metadata.