It is almost impossible to get a layoff only based on the factor that they knew you are looking as long as the business of the company is good and you keep good relation with bosses.
Even the Job offer saying all the job is "At-Will", it is practically not easy for a company to let you go without any solid reason.
Therefore, it is not a simple issue, totally depends.
Thanks!