I would guess that you are probably pressing into the keybed. Once you produce a sound by playing the key, there is no reason to press and by pressing, all the energy you are putting into the piano is backfiring into your joints, tendons and ligaments. Playing to the point of sound, that little bump you feel when you slowly depress a key without making a sound, should be sufficient. There is no point going beyond that into the keybed.
The second thing you might be doing wrong is playing from the flexors. It is not your fingers that play the piano, it is your arm. If you play from your flexors, the muscles in your forearm which flex your fingers, as most pianists do, your fingers will be sluggish and uneven because the flexors are strong but not fast. They are also interconnected so if you try to isolate one finger you pull on the others which will create uneven playing and tension since a bone can only move in one direction at a time. If you have several muscles pulling on one bone, there will be tension as they all seek to gain control of it. This is the nascence of tendonitis.
Play a chord on the piano. Notice that you did not use your fingers at all. You used the hinge of the elbow to raise the hand up then allowed gravity to play the fingers down into the keys. Don’t let too much weight down because that will cause tension, just enough to play the chord evenly. Now do the same with single fingers careful not to isolate one of the unused ones.
Notice that the key is a fulcrum so, it is lightest on the outside edge. The keys are heavier on the inside black area. So it would behoove you to learn to play out on the edge. But, your fingers fall off the keys . . .
Notice each finger is a different length. To prevent them from falling off the keys you now need to employ an in/out motion from the shoulder and elbow. This movement makes the fingers equal. So that you don’t fall off the keys, each out motion must be accompanied with a forward shift movement THIS IS NOT PRESSING. Never press into the keybed.
If some of the fingers still feel stiff and weak, specifically your four and five, you need to realign the forearm behind those fingers when you play them.
There are several other movements but these would be the ones I’d start with to free the fingers so they can feel effortless - which they will because you aren’t using them.
When you combine all the movements of in/out, up/down, left/right, pronation/supination, forward shifting and constant realignment, your hands take on a shape or gracefulness and it is effortless because you are not using the wrong muscles to play.
Many teachers don’t know the physics and anatomy of playing which makes them a liability. There is an epidemic of repetitive stress injuries because people jump into playing an instrument or typing without ever learning the physics or ergonomics. Too many teachers start teaching their students to play before teaching them HOW.
I suggest you find a new teacher who knows what they are doing anatomically. Every teacher thinks they can teach but they can’t. They only know what they know but it is what they don’t know which will hurt you.
Re-learning how to play will be a difficult task as you have already hard wired (muscle memory) improper movement into your brain. The first thing is to never ever play your old repertoire again as your improper movements are hardwired into those songs.
Re-learning how to play is difficult and impossible for many. Some people don’t have the intelligence, patience nor dedication to retool their technique.
The first teacher a student has sets the stage for virtuosity or mediocrity. If they allow flaws into your technique, those flaws are there forever. That should be the new definition for virtuoso: Someone who moves properly.