Can planets collide ...
According to Wikipedia
The International Astronomical Union (IAU) defined in August 2006 that, in the Solar System, a planet is a celestial body which:
- is in orbit around the Sun,
- has sufficient mass to assume hydrostatic equilibrium (a nearly round shape), and
- has "cleared the neighborhood" around its orbit.
This last requirement makes it difficult, if not impossible, for planets to collide.
... and not melt together?
Some planets are gaseous/fluid (e.g. Jupiter) and don't have anything solid to melt.
I suspect that any body large enough to meet the second requirement of the IAU definition, colliding at a closing speed anywhere near planetary orbital speeds, is very likely to involve energies easily large enough to convert any solid matter to a fluid of some sort.
If you look at smaller events such as the hypothetical collision between Earth and Theia, there is a fairly thorough coalescence of matter from both bodies.
in the aftermath of the giant impact, while the Earth and the proto-lunar disk were molten and vaporized,