Completion in indented lines incorrectly strips the prefix when jedi is disabled.
Originally reported in Notebook (jupyter/notebook#7397) then JupyterLab (jupyterlab/jupyterlab#16522), but narrowed down to IPython 8.8 / 8.11; #13943 fixed a related issue but did not cover this one.