TL;DR, the test is for the presence of the SRY gene, which in most cases will identify male vs female. However, there are edge cases where it will be inaccurate because the gene doesn't function or other circumstances lead to a biological female (e.g. testosterone insensitivity). False positives from contamination and access of poorer countries to good laboratories and genetic counselors is also questionable.
The test stopped being used in 2020, so it's not clear why it is being brought back now.