Friction shift levers have the ability to adjust the amount of friction available.
If there is not enough friction the spring in the rear derailleur will be able to pull the cable and move into high gear.
Generally there are two types of friction adjustments:
These shift levers have a D ring - circled in blue. To increase friction turn the D-ring clockwise.
These shift levers have a screw - circled in blue. To increase friction turn the screw clockwise.
If you tighten the D-ring or screw and shifting works normally for a short time and then the adjusting mechanism gets loose again you may need to disassemble the shift lever mechanism and clean it. Look for any damaged or worn parts while cleaning and replace as needed.