sbt is still on JLine 3.19.0, which is quite old — it's from 2021. The JLine folks have fixed a ton of bugs since then. Current version is 3.24.1.
At minimum, it would be good for sbt 2.x to upgrade. We could also look at whether a backport to 1.x would be feasible.