Maybe you stripped the starnut actually? As in, the core of the starnut came loose from the flanges, and when you twist the compressionbolt, the core moves on with the bolt but does not tighten nor untighten.
BUT anyways, what you just described is probably the best way to get it detached. I've seen results worse than this when theres a situation where the starnut doesn't want to explode nor move backwards out in a way like you just described. Congrats.
To avoid this next time, I'd reccomend using an SCS or an HIC system, because removing broken starnuts from forktubes is easier as forktubes are accessible from both ends as opposed to handlebars which have just one entry/exit (excluding "Buff" 3-piece bars)