The issue is that the material that accretes into terrestrial planets/asteroids/etc. is expected to be solid when accretion starts.* Planetary differentiation can only happen if substances can flow past each other. This requires the interior of the object (or some part of the interior if it is only partially differentiated) to behave as a fluid. Large amounts of solid may behave like fluids over very long periods of time, like the Earth's mantle is believed to, but this flow is extremely slow, i.e., it is very viscous when viewed as a fluid, and heating it up makes it faster. Matter in the Earth's mantle, which is only slightly melted, is currently believed to take millions of years to move between the upper and lower mantle in convection currents. If the mantle were much colder, this flow might take billions or trillions of years, if not much longer, i.e., it might never actually happen, and thus no differentiation would happen. Thus, in this temperature range, heat is needed for an object to differentiate. (Note that the Earth's original differentiation may not have taken even millions of years, since the Earth's interior may have been much hotter then.)
However, once the interior of a body is sufficiently heated for all of the significant components (ices, silicates, metal, etc.) to have melted into a fluid, you are correct that more heat would tend to counteract differentiation. It could do this by just creating turbulence, like the convection cells believed to operate in our mantle, or by causing the different layers to become more soluble in each other**. This is why the sun is believed to be mostly homogeneous in elemental composition: The sun probably contains ~500 times as much heavy elements as the rest of the Solar System put together inside it. One could imagine this all sinking into a huge solid or liquid core at the core of this sun, but the core of the sun is so hot that any such solid core would probably quickly boil (/"dissolve") into the surrounding plasma, and the heat creates enough chaos that it probably mostly counteracts any gravitational settling effect that would cause heavier atoms to sink to the core in the first place.
*The reason matter accreting into small objects is expected to start out solid is because the pressure in the nebula is too low for anything to be stable as a liquid (or at least not anything common enough to actually accrete into a droplet in the first place), so everything is either solid or gas (extremely diffuse gas) until it accretes into a body where the pressure caused by the weight of the matter accreted above it can provide enough pressure for it to have a liquid state. This often isn't very much pressure, but even once this pressure is reached, it will usually have to heat up to reach that liquid state, because things usually need to be significantly colder than their triple point to deposit out of the near vacuum of a proto-planetary nebula to form solid dust grains that can accrete into larger objects.
The exception to this rule is gas giants and stars. Once enough mass gets collected into a small volume, its gravity is able to pull gas out of the nebula into it. This gas obviously starts out as a fluid, and, since it is mostly hydrogen and helium and because of the properties of those elements, it is unlikely to become solid under realistic temperatures and pressures that could occur during accretion. Thus, although heating (such as the extra heat released by the gas accreting) may melt a preexisting core of solid heavier elements and help differentiate that, more heat can only make most of the interior of a gas giant less differentiated. (Note that, although the cores of gas giants are probably 10s of thousands of kelvins, they may still have solid components or be fully solid due to high pressure so that even more temperature is needed to melt them)
**although layers that are soluble in each other may take longer than the lifetime of a planet's star-system to actually fully dissolve in each other once they become separated, since thermal convection is density-driven and therefore generally doesn't cross sharp changes in density*** and diffusion could take way too long with something so large due to the square-cube law https://iopscience.iop.org/article/10.1088/0004-637X/803/1/32/pdf . This is relevant to gas giants, since it is believed that many if not most of them started out as terrestrial planets that got large enough to pull gas onto them out of the disc.
***For example, the Earth's outer core is believed to be more than twice as dense as the lower mantle. In order for thermal convection to mix the two layers, parts of the surface of the outer core would have to become so much hotter than the mantle directly above it, which it would be heating by conduction, that it became less than half as dense so that it was less dense than the lower mantle above it and became buoyant. This would probably never happen because such heat would also heat the mantle above it to have similar drops in density. (I don't believe that the surface of the Earth's core would boil at any temperature, but rather gradually become less dense, because the critical point of iron is only 87.5 GPa ±14% and that of Nickel ~0.29 GPa: http://www.knowledgedoor.com/2/elements_handbook/critical_point.html vs ~136 GPa for our core-mantle boundary.)