There is a robust implementation of HWE Test that takes into account population substructure:
RUTH - Robust Unified Hardy-Weinberg Equilibrium Test. It is used for the TopMed pipeline.
The GitHub repository is here:
It would be great to have an implementation in Hail to run on matrix tables containing a large number of samples with mixed ethnicity…