Temporary method: Wrap durable elastics (the type taken off stock dolls and their packaging) around the leg at the foot then gently roll them up the leg then use a tooth pick or tweezers to get them over into the hip socket.
Permanent method: Teflon tape is one of the more important tools in a doll collectors arsenal, it’s a tape that won’t melt plastic or degrade and that can be pulled into a very fine string to fit around floppy joints, around necks that need re-inforcing and for holding glued things tightly together while they dry (snapped barbie necks for example). It costs about a $1 at any hardware store or off ebay. It’s the playline version of sueding a BJD and the knowledge was passed down from japanese obitsu/volks articulated doll collectors and action figure kitbashers.