Your coconut milk can split when the coconut milk is heated too high or heated too long.
When the coconut milk is heated too high or heated too long it causes the fat in the coconut milk to separate from the liquid.
This often happens when you boil it or add acidic ingredients too early during the cooking process.
This is because the proteins in the coconut milk coagulate at high temperatures which lead to separation of the milk and fats.
Boiling the coconut milk is a major cause of splitting of the coconut milk as it rapidly breaks down the emulsion which keeps the fat and the liquid together.
Other things that can cause your coconut milk to split are adding ingredients that are acidic such as lime juice or vinegar before the cooking process is nearly finished which can cause curdling and splitting of the coconut milk.
Some brands of coconut milk also may have less stabilizers, which make them more prone to separating.
To prevent your coconut milk from splitting.
Cook at a low simmer and always cook your coconut milk over low to medium heat and avoid a full boil.
Add any acidic ingredients towards the end of cooking and use good quality coconut milk that have stabilizers to help maintain a smooth consistency.
Avoid any vigorous stirring as this can also disrupt the emulsion and instead stir the coconut mil gently.