Pour an oat or soy drink into black coffee and it sometimes separates into flecks and a watery layer. The cause is a combination of acidity, heat and the way plant proteins are held in suspension.
Proteins hold together only within a range
Proteins in any milk-like liquid stay dispersed because they carry a like electrical charge and repel one another.
Acid neutralises that charge. As the mixture approaches the point where the charge cancels out, the proteins stop repelling and start clumping.
Heat accelerates the process by making the protein molecules move faster and unfold, exposing surfaces that stick to each other on contact.
Dairy has a structure that plant drinks do not
Casein in cow's milk is organised into stable clusters that tolerate a good deal of acid and heat before they collapse.
Plant drinks contain protein extracted from a seed, grain or nut with no equivalent architecture, so they reach their aggregation point sooner.
Soy, with relatively high protein, curdles visibly. Oat and rice have less protein, so they separate less dramatically but also give less body.
Coffee is a hostile medium by design
Brewed coffee is acidic, and the acidity varies with origin, roast level and extraction, which is why one bean curdles a drink another does not.
It is also served near boiling. Adding a cold plant drink to that creates a sharp local temperature difference exactly where the acid is strongest.
Lighter roasts and higher-acidity origins cause more trouble than dark roasts, which lose acidity during roasting.
Barista formulations solve it chemically
Versions sold for coffee typically carry added fat, adjusted protein and buffering salts such as phosphates that resist the drop in acidity.
The buffers hold the mixture away from the point where proteins aggregate for long enough that the drink is consumed before anything visible happens.
Added fat and stabilisers also give the foam something to hold onto, which is a separate problem from curdling and solved by different ingredients.
Order and temperature change the outcome
Warming the plant drink before it meets the coffee reduces the temperature shock and often prevents separation on its own.
Pouring coffee into the plant drink rather than the reverse dilutes the acid gradually instead of dropping cold liquid into a concentrated acidic pool.
Neither trick changes the chemistry, but both slow the encounter enough that aggregation never reaches a visible scale. Small clusters form regardless; they simply stay below the size at which the eye registers them as flecks.