Let's start by saying that the LJ potential is a very, very crude approximation to a real atomic potential: the $r^{-6}$ term can have some sort of justification because we can say that it comes from dipole-dipole interactions, but the exponent $12$ of the repulsive term is completely made up and has no theoretical justification whatsoever.
But most importantly, the LJ potential is spherically symmetric, so it is only good to approximate the behavior of atoms or spherically symmetric molecules. Thus, it can be a decent approximation for noble gases, but for must substances it is a very poor choice: we just use it because it has a very simple mathematical form.
This said, the answer to your question is that, since the potential describes the interactions between the atoms, of course it will be the same in any phase. Below, you can see the phase diagram of a LJ system (source): as you can see, all three phases are present. This diagram was obtained by means of a computer simulation by varying temperature and pressure, but the interaction potential was left unchanged.
The origin, or better the justification, of the repulsive and attractive part is always the same, like lemon wrote: Pauli exclusion principle for the repulsive part and dipole-dipole (van der Waals) forces for the attractive term. These are an approximation of the interatomic potentials, so, once we take them on trust, there is no reason why they should change during a phase transition.
A phase transition is a macroscopic change in the properties of the system, but the laws governing the microscopic dynamics are always the same.