No program would ever hire a HEAD COACH solely to lure a recruit. Head coaches are way more valuable to a FB or BB program than any one recruit (hence their multi-million dollar salaries).
You could make a rule pertaining to assistant coaches/administrative assistants, but you would have to differentiate between the child of a long-time assistant (and who should not be restricted from playing for the team he/she grew up cheering for) and the child of the assistant that is hired right before his/her kid commits to a school (essentially pay for play). So then how long out should this restriction run? Can't sign a kid to a LOI within 1 year of hiring their parent/guardian? 2 years? 3 years? A program might be willing to have LaVar Ball on staff for 1 year to reap the benefits of Lonzo, but they probably don't want to put up with that for 3+ years.
Of course, once you figure that all out, these programs will just do the same thing with the kids' AAU coach or high school coach.
It seems unsavory, but there is probably no clean way to regulate it.