This is a really interesting question, and research is definitely being done on this!
In one of his team’s recent papers, Dr. Adam Zeman (the scientist who popularized the term aphantasia) wrote that “aphantasia appears to run within families more often than would be expected by chance,” which definitely suggests that there is some sort of genetic link to the lack of visual imagery. You can find the paper and a summary of it here!
He also talks a bit about the heritability of aphantasia in his Q&A with the Aphantasia Network if you’d like to check that out as well.
As far as I can tell, no one has yet isolated any genes responsible for aphantasia (the research on the genetic link is still in pretty early stages), but people are certainly looking 🙂