Thank you for posting. I’m sorry about the troubles with your keyboard.
I downloaded DroidVim onto my Google Pixel 2 and when using the Plugable BT-KEY3XL, the Esc key appears to be working properly for switching in and out of command mode.
I suspect that in your Samsung S9, the Esc key has been set as a keyboard shortcut for switching input methods. You should be able to change this.
Samsung’s Android interface is different than stock Android devices like my Pixel, and unfortunately, since we don’t have one here to test with, I can’t tell you exactly how to change this setting. But you should be able to go into Settings, select the Language or Input settings, select external keyboard, and then turn off any shortcuts for changing the input method.
I hope this helps.