Debug an issue in publish-plugin? gradle.plugin not being prepended to groupid

I’ve recently made some changes to my build that result in the plugin being published with my raw groupId instead of the special gradle.plugin.my.group.id path, particularly visible when using the old style plugin inclusion:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.my.group:test-gradle-plugin:1.0.0"
    // vs
    classpath "my.group:test-gradle-plugin:1.0.0"
  }
}

I can’t seem to figure out why? And I can’t debug it without the gradle plugin plugin source code (which appears to be unavailable: Source code for com.gradle.plugin-publish) . Is there some condition under which the publish functionality doesn’t prepend gradle.plugin. to the group id? Am I overwriting it somehow and I don’t know where?

So I’ve isolated the issue to using the maven-publish plugin.
Gradle version 5.2.1
gradle-publish-plugin version 10.1.0

if using both maven-publish and com.gradle.plugin-publish together, the gradle.plugin prefix to the artifact is removed (presumbly by code in maven-publish).

This might be related: Maven-publish plugin: DefaultMavenPublication can't find method groupId - #3 by Abhijit_Sarkar.
I am referring to:

uses the project.name as the artifact name.

Hrmm… anyone on the gradle team interested in addressing this issue?