A month off is nothing unusual and people do it all the time for their own illness or taking care of sick family. It happens all the time and I am sure your company had others being sick for prolonged period. A month isn’t even that long. That’s what FMLA is for
Well if you were repeatedly not doing your job causing others all kind of problems and constantly written up but still are there, I’d say possibly it’s because you might threaten to sue. But you are NOT repeatedly not doing your job, right? You do perform tasks they assign and it has to be valuable unless they assign busy work? Why would they fire you