For anyone using chroot to enter their build image and issuing commands manually:
With images that use glibc2.42+ bash will fail to use the cursor and tab keys. Very annoying. This will happen when the architecture of the host is different from the image.
Solution:
Use qemu version 10.2.1+.
https://ftp.woudstra.mywire.org/qemu/
As a workaround, you could use a statically build version of bash on the image, build with musl instead of using glibc. Then no changes are made to the host.
https://ftp.woudstra.mywire.org/repo/aarch64/bash-static-git-5.3.0.c868696bb-1-aarch64.pkg.tar.xz
Or
https://ftp.woudstra.mywire.org/apt-repo/pool/main/bash-static-git_5.3.0.c868696bb-1_arm64.deb
Hopefully the fix will be down-ported to lower qemu versions. It all has to do with termios2 support, which is needed for applications build on glibc2.42+