Why does coconut milk separate in coffee?
Regular milk is an emulsion - a liquid [fat] suspended in another liquid [water], in its simplest terms.

Coconut milk is a suspension - a solid suspended in a liquid.

Mixing an emulsion into another similar liquid base tends to remain emulsified.

Mixing a suspension into another liquid, there is a distinct possibility that the two will re-separate, due to the heat-shock, &amp; form clumps.

Perhaps if you pre-heated the coconut milk, it may tend to mitigate that, though your tests would seem to say otherwise.
I'd hesitate to say add a thickener first, such as cornflower, &amp; preheat - this would bind it, but I'm not sure the result would be pleasant.