For example, public schools typically demand very specific credentials before they employ someone in a teaching position. Individuals or private institutions might have different demands here. I certainly know personally a lot of people who I'd gladly hire to teach my kids, but who do not fulfill the requirements the public schools set upon teachers.
Second, there's no such thing as "shortage" in absolute terms. There is only shortage at a given price point. If government finds it hard to hire people, tough shit, maybe it should pay more, or demand less at the current wages? Government is not entitled to artificially cheap labor, and if it finds itself unable to compete for the workers, who are poached by the private sector, maybe it should just outsource the entire enterprise to organization more capable at the task?