They are not allowed to ask you. They can only check if you are eligible to work, but can’t ask why, how, where you obtained your status that gives you right to work. This for normal Human Resources people who are informed. Unfortunately others will ask, and it happened to me on my old job. Very illegal. I wanted to sue them. I didn’t.