Why does milk curdle after being boiled with ginger?
If you want to prevent the milk from curdling when adding ginger, you have to boil the ginger or at least add it to boiling milk.

Ginger protease (the curdling agent in fresh ginger) is rapidly destroyed at temperatures above 70°C. It does not matter if the milk has been boiled in advance if you add ginger to cold or room-tempered milk, it will still curdle.