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 (e.g. Jupiter) Some planets are already mostly molten (e.g. Earth?)
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.