I have a theory about this! I believe some authors (COUGHANDYWEIR) are calling their writing non political when they mean non allegorical.
A lot of people think that for a story to be political every character and plot beat has to be secretly representative of some real-world person or event. Think Animal Farm, where the whole story is about the rise of the Soviet Union and every single animal has a parallel human being in early 1900s Russia. Lord of the Flies is another classic, with every child on that damn island representing some facet of humanity (Simon is empathy, Piggy is intelligence, Jack is barbarism) and the events loosely paralleling the rise of facism in 1920s-30s Europe.
Going back to Andy Weir, Rocky and Grace in Project Hail Mary are not stand-ins for real people and they don't each represent anything as basic and fundamental as "the human spirit" or whatever. They're characters. The story is a story. It's a story where (fantasy) climate change exists and the correct solution is to band together and throw science at the problem, because I suspect those are Andy Weir's personal beliefs (interestingly, "band together and throw science at the problem" was also the solution in The Martian).
So if an author has just written a story ... and yeah it contains their political beliefs, because that's just background noise, but they didn't intend for that story to be a direct allegory ... they might assume that the story is not political.