https://stackoverflow.com/questions/66283714/how-can-i-force...

explicitly using vim (rather than the vi alias) is supposed to give the return code behavior you prefer.

Thank you! That actually explains everything.