Console up arrow doesn't bring back last command reliably

There seems to be a bug in recent versions of RStudio IDE where the console history (via up arrow) doesn't reliably bring back the last command run. It seems to skip lines sometimes. I can't quite isolate what is happening. It seems that maybe it skip lines that I enter directly into the console versus lines that come from the source pane, but I haven't reproduced the issue carefully enough to know for sure. I do know that it doesn't 100% skip these history lines.

This is happening in Version 2025.04.0-daily+168 (2025.04.0-daily+168), but was also happening in the most recent stable release.