Nope, because then the discrimination laws apply and they are a “protected class”. Political affiliation is not a protected class.
Neither are illegals...
Can an employer interviewing someone for a job, ask who they voted for and make their hiring decision based on the answer?
Can an employer fire anyone who supports Trump and it’s known in the workplace? (assuming the boss is a lib)