How much weight do Math PhD programs place on the subject GRE?
I worked in the admissions office of the graduate school of arts and sciences at Harvard University.

While the GRE is important, there are a kaleidoscope of other factors that admissions takes into consideration.

You stated, quite eloquently, what happened, which was that you were so engaged in research that it hurt your study time for the GRE.

Admission officers value applicants who display intellectual curiosity but also honesty.

In your statement of purpose, explain what happened

If you were wanting to get into a top-five university, what about applying as a special student. The GRE is not required, but I must warn you, it is still as competitive as applying as a degree seeking student.

Just a thought, and wishing you all the best in your educational pursuits.