Did you ever get an answer to this? I have a similar behavior that happens occasionally, but I haven't (yet?) done a ton on my new-to-me 2018 UGS. The last time this behavior occurred, I had stopped the engine via the kill switch, waited a minute, then toggled it back to the middle step (run) and bump-started the bike in third at about 5-10MPH. It was a little scary as the road I was on was one and a half lane at best and very windy, so I couldn't pull over safely. I killed the engine via the switch and started it while coasting but it was the same. When I could pull over I did, cycled the ignition and it was OK again afterwards. CEL was on when it was behaving erratically but immediately off once running normally again. Obviously a different cause than yours, but identical behavior.
I had the issue before with another weird starting sequence. I had dumped the clutch while in gear at a stop (just missed nuetral I guess) and started it again afterwards without turning off the ignition. And had the same weird 1-3k rhythmic surge.
I haven't got the torque app hooked up to it yet but may try to reproduce it and grab the code while the CEL is on.