Please see Nechemiah 13:1. This verse quotes Devorim 23:4. Why change Hashem to Ha-Elokim? Similarly, why does Verse 2 substitute elokeinu for Hashem elokecha.
Two interesting point, but unfortunately I don’t have an answer for you. I looked around but I haven’t seen anyone who talks about these points.
Kesiva Vchasima Tova