Hi Jose,
Welcome to Microsoft Community.
I'm sorry to hear you're experiencing this issue with your Surface Book 2. If you have tried all the troubleshooting provided in this support link [Fix problems detaching or attaching your Surface Book keyboard - Microsoft Support] and it still doesn't work, and there is an error code in the UEFI, your Surface may have a hardware issue.
Unfortunately, because this model has been discontinued, out of warranty support and service for such models is no longer available. We appreciate your commitment to Surface and apologize for any inconvenience.
In addition, I found that there are users in the community who have encountered the same problem as you, and one user provided a method to manually release the Surface Book 2 keyboard using a paper clip. UEFI firmware code 14 - Microsoft Community
Disclaimer: Microsoft provides no assurances and/or warranties, implied or otherwise, and is not responsible for the information you receive from the third-party linked sites or any support related to technology.
I hope this helps. If there is anything not clear, please do not hesitate to let me know.
Your Sincerely
Hahn. W - MSFT | Microsoft Community Support Specialist