Math Easy Solutions, don’t upgrade the whole Surface just because the pen was acting possessed. Start with a new compatible pen and basic fixes from Microsoft’s Surface Pen troubleshooting and compatibility guide; on a Surface Pro 6, pen glitches are often the pen/battery/pairing, not the tablet itself.
If your Surface Pro 6 still runs fine, a replacement pen is the cheaper, smarter move. I’d only upgrade the device if you’re also annoyed by the battery life, heat, lag, or overall age of the Pro 6—otherwise swapping a broken/glitchy pen is the obvious play.