I remember it happened a few years back in a WTA event. Because of the rules one player knew as she was coming into her FQ match that there was a LL spot available and that she would get it if she lost, so she withdrew and entered R1 as a LL. It caused a fuss and a demand for rule changes but I can't remember if a new rule was brought in.
From the 2024 WTT regulations (aka ITF). Note it says retire - it might not necessarily be the same as a walkover !
"If a player is forced to retire from her final round of Qualifying due to illness or injury, the player will retain her Lucky Loser status provided she receives medical clearance from the Tournament Doctor/Sports Physiotherapist."