Slicing happens when you come into the ball from the outside-in, and the face is open to the path. The only way that your brain is going to trust getting away from out-to-in and swinging in-to-out is knowing that you need to get the face square a little bit earlier.
Using an impact bag, take a backswing and overexaggerate rotating the face to tap the bag with the toe of the club closed. Instinctively in order to do this, you won’t want to come from out-to-in to do this; you’ll come more from the inside and cure your slice forever.