You can pay for art or team up with an artist, or just stick with minimal art styles and games that can get away with it (like puzzle games can often get away with it, although they also tend to make less money on average).
A pitfall with teaming up with an artist is there's no guarantee they're going to stay motivated to work on the project (it can happen for me too, I take long breaks sometimes, why I haven't really tried to team up with anyone lately even though I have years ago). I've had a couple games I've had to scrap because the artist lost interest or had things going on in their personal lives.
There's also paying for art, but that's a bit of a risk, especially with a lot of people either reselling the same art assets with slight tweaks to a bunch of people, using generative A.I., or just selling you art assets they took from elsewhere. So you need to do your due diligence and verify the work of an artist and their skills before you employ them. I have a couple friends that I know that I'm planning to hire to fill in some gaps of my art when I nail down the rest of two of the games I'm working on.
You can do a minimalist art style too, but that doesn't always grab people's atention, so it's a risk. You can make things look more interesting with a lot of movement and animation 'juice' though, instead of making everything static. Two of the games I'm working on use a pretty minimalist art style. One is a modern refresh of a game I released 20 years ago that got millions of plays as a Flash game that I released with (frankly not great) art, so it's possible to make games people will enjoy without amazing art.
But you're really not wrong at all that artists seem to have better luck learning just enough code to use a modern game engine like RenPy or something than vice-versa nowadays, and seem to enjoy a lot more success. Or they can just make beautiful board games, which don't require coding at all and gamers are even more drawn to great art than they are in video games, imo.