Do you refer to what you do in the gym as "working out," as "training," and "as practice," in your mind or when you speak about it?
I think it really matters how you think about it.
Here is how I see them.
The goal of Working Out is what? The goal of working out is getting tired. Getting drain. Working hard.
If you think of your time in the gym as "working out" you predispose yourself to aiming to get tired. Your main goal is, make sure I work hard. If form and technique break down a little bit, or a lot, but you get tired and put in serious effort, you have achieved the goal of "working out."
The goal of Training is to improve yourself at a task or to reach a goal. You will accept some mild form breakdown if it means that you get in a little more training for your eventual activity or to get you closer to your goal. Work, and feeling like you worked, is secondary to getting things done that will improve you within a structured approach to your goal. If you check off the boxes you have planned for the day, you will move on and it doesn't matter much how hard or not-hard it seemed.
The goal of Practice is to improve your skill. You don't keep practicing until you are tired. You keep practicing until you aren't adding any value to your skill any longer. Once your reps stop getting better, you are done. Once you aren't able to keep focused on the task at hand and get better, you stop. You are practicing, and practice makes permanent, so you stop once things get bad. Also, you think about each and every rep not as something to get done but something to get you better.
Short version? You work out to get exercise, you train to achieve a goal, you practice to learn a skill.
Now I know these terms can be used differently in other contexts. All too often sports practice is working out by a different name - think repeats and gassers and laps and squat-thrusts, here. But as many much greater coaches than I am have said, anyone can get you tired, but a good coach can get you better. If you don't walk out of practice either better or primed to be better next time, you are pushing too hard or too much or working harder not smarter.
And it's important to realize that strength is a skill. You can practice being stronger. It's not about annihilating your muscles until they respond and get stronger, but giving them practice lifting heavier weights. They'll respond and so will you.
If you end the gym thinking, "I need to practice my lifts, and practice being healthier and fitter" I think you will have better results. You will also categorically have different results - each time is a way to improve, not work.
This is a mindset I have to cultivate in myself - it doesn't come naturally. I'm very good at pushing hard. But I've achieved my best gains when I think of my sessions in the gym as practice. I'm practicing skills. I'm practicing being strong. I'm practicing being mobile. I'm practicing being a healthy, functional human being.
That practice beats working out. I think you might find the same.