The bathtub trip lever slides closed because it wears from repeated use. Your problem is common in any older home with a trip waste assembly. Most trip levers connect to a bucket and rod assembly that close the opening from the bath shoe to the drain.
What keeps the bucket from closing the drain is a spring and cam on the trip lever. After years of use, the spring loses some of its tension and the cam wears to a round bump. It no longer snaps in position and lets the bucket drop down closing off the drain.
Fix or replacement is only a screwdriver and needle nose away.
The bathtub trip lever will slide to half closed or half open and water doesn’t drain correctly during a shower.
The trip lever connects to the linkage with a brass cotter pin. Remove the two screws on the trip lever and gently lift the linkage and bucket out of the overflow riser. Remove the cotter pin and swap the old trip lever for the new one. You may want to use a Scotch Pad to buff off any crud on the brass bucket before reinstalling.
If your drain linkage is broken off the trip lever, you can retrieve it with a flexible claw pickup tool. Pushbutton activated claws will grip onto the brass linkage to remove it from the overflow.
One last note: If the drain is clogged and requires snaking, the snake goes into the drain through the trip lever hole, not through the drain (bathtub) as most attempt.