They are nice for little "hello world" applications that demonstrate how easy it is to create and deploy a new project, but it's just like the "programming language demo snippet" problem - it tells you nothing about what it's like to use this thing in a big, long-term project.
APIs and libraries on the other hand are usually not a problem. Especially graphics APIs - if you have a big project that makes heavy use of a graphics API, it's probably best to create an abstraction layer. That can be a very tricky task at conception, but it gives you a lot of flexibility later. It's definitely necessary for dependency inversion.
With frameworks you don't get that benefit. Making a "framework-independent" application (not library) through abstraction is a bit like trying to kiss your own butt. You'll probably break yourself while attempting it and it's a dubious goal in the first place. (I tried it with ASP.NET Core and I still have back problems)
The worst thing about frameworks is that they force their architectural style on you. If you want to get anything done it's a bit like working in a very large company - you have to spend a lot of time learning all of its little idiosyncracies, politics and issues so you can adjust to them, your work has to mirror all of their design mistakes and they can basically just decide to effectively cancel your project at any time for no reason.