I agree that ph is not the most important thing. Fish can adjust to different ph levels. Hardness is a totally different matter though. Keeping soft water fish in hard water and vice versa has been shown to dramatically decrease the fish's life span.
Since bettas are soft water fish, they need to be in soft water. If they are in hard water, minerals will build up in their intestines and eventually kill them.
I couldn't find the study I was looking for. There was a German study done in the 1980s on the effects of hard water on cardinal tetras. They found calcium deposits on the tetras intestines.
Here is one link that talks about soft water fish (catfish) being more susceptible to columnaris in hard water. https://agresearchmag.ars.usda.gov/2015/jun/fish/
Here is another link that touches on the subject. https://www.biotopeone.com/water-hardness-and-its-effect-on-your-fish/
Here is a quote from a scientist on a fish keeping forum I'm on:
"Freshwater fish species have evolved over thousands of years to function in a very specific environment. "Environment" here refers to water parameters (GH, KH, pH and temperature are the parameters) along with all aspects of the habitat from substrate to aspects like wood/rock to light to water flow to other species. The further away from this environment the fish become, the more difficulty they have to maintain their regular daily bodily functions, what we term the physiology and metabolism. Stress always results, and it increases as the fish are forced farther from their preference--which is not really a "preference" but a mandatory state.
Water continually enters the fish through every cell via osmosis, and at the gills. Every substance dissolved in the water thus enters the fish, into the bloodstream and internal organs. Fish like the livebearers that evolved in moderately hard water absolutely must have dissolved calcium and magnesium in the water, and these two minerals are the primary component of GH. Their physiology needs these minerals in the water in order to function properly. As one simple example, the fish must regulate the pH of its blood to match the pH of the water it lives in; as soon as the pH of the water moves outside the fish's preference, it has difficulty functioning. The stress weakens the fish's immune system, making it vulnerable to disease that it would (or should) normally be able to deal with without succumbing. Other problems ensue, further weakening the fish; energy that would otherwise be used for spawning, feeding, escaping predation, etc, is being wasted on keeping the poor fish alive. It will absolutely never reach its normal lifespan, as a direct result of all this.
Ichthyologists (fish biologists) who have studied fish species have determined general levels for GH. These studies are based upon the GH of their habitat waters as well as from studies using softer water that monitored the declining health of the fish and their shortened lifespan. The same works in reverse for soft water fish. A study in Germany inn the 1980's proved that the level of GH of the water was related to the lifespan of cardinal tetras; the higher the GH (meaning more dissolved mineral) the shorter the lifespan. Necropsy (autopsy of animals) showed calcium blockage of the kidneys, a condition that increased with the higher GH. There is no reason at all to doubt that this applies to all soft water species, albeit in differing degrees according to the species habitat."