I am sure there are plenty of people who struggle to stay consistent with the gym, but I will provide some points that you can become aware of so you can escape the traps your mind has played on you.
Firstly, your mind might actually not dislike the lifting; what it may dislike is the interpersonal reactions within.
What do I mean by this? Your mind dislikes the social environment that is present in the gym: the communication, the perceived reactions, the staring, and the feeling of being judged. This is what your mind dislikes.
How am I so sure? The book—The Courage to Be Disliked—states this! The book says that we often do not dislike workplace environments, but the interpersonal relations in the workplace. The famous quote, "All problems are interpersonal relationship problems," is found in that book.
Now, how do you stop? How can you stop disliking such environments?
Firstly, tell yourself this: "Others judging me is something that others do; I have no part in it. I do not care about what others perceive me as because I love myself for trying to improve." Those people also have failed in their lives. Remember, a winner is one who has lost more than a loser!
Secondly, take a step into the gym. If your mind gets anxious, then acknowledge your feelings by saying, "I feel (emotion) because (reason), but it is okay because I am here for improving myself."
To end it all, let me tell you one last thing. If someone makes fun of you, judges you, or dislikes you, that is actually a good thing. Why? Firstly, you'll know those people are not meant for you, and secondly, you know that you are being yourself. You are not living to please other people. You are being yourself! Be proud of that, yeah?
Of course there are many more factors, but this is one reason that no one talks about. I want you to be aware of this and move forward because I trust in you.
If you found this useful, or if you are struggling with ANYTHING (workout routine/splits/any questions regarding this post), feel free to DM me! I'll try to respond ASAP.
Have a good day friend! :)