How did Microsoft handle that threat? They stole the lead developer of the Delphi compiler Anders Hejlsberg - who joined Microsoft and is the chief architect of .Net framework. In fact - if a lot of .Net concepts are direct implementations of Delphi and the VCL (properties, etc.)
Yep, Microsoft stole the one certified genius coder right from Borland. And the rest is history.
He left Borland and joined Microsoft in 1996. The year before, Philippe Kahn resigned as chairman, CEO and president, after 12 years at the company. I don't know if that was a symptom or cause of Borland's demise, but losing such key players must have been the nail in its coffin.
Anders Hejlsberg is one of my heroes, a giant in the programming world, being the creative genius behind Turbo Pascal (which I grew up with as a child), Delphi, .NET Framework, C#, and TypeScript (which I write regularly as a professional with greying beard).
Antics like that helped speed their demise.
However, when we upgraded to Borland 4, we encountered catastrophic bugs: Symbols were flagged as undefined that were successfully linked a few modules earlier. Use of 'new' operator in a DLL crashed the program (that one cost us two weeks). To be clear: these were bugs in the compiler, as they had compiled & run with no problem in the previous version.
We had to switch to Visual Studio.
They had some quality products, innovated and supported software developers. Not every product was a winner, but there were some great dev tools (c++ compiler, Delphi, Pascal).
But in the end I actually have no idea what went wrong and how they disappeared so quickly.