I don't know that nystatin suppresses the immune system, but diflucan can. Microbes tend to have machinery in place that identifies external substances that damage the cell, and then develop eflux pathways (exit doors) to pump these substances out as soon as they enter the cell. Another method is to alter the outer cell wall membrane to make it less permeable to toxic substances. I'd have to look and see what has been found out about the exact mechanism involved. Mechanisms can vary from one strain to another, and in all likelihood, there are several in place.
Both can create antifungal resistant strains and this is especially true of the azole class of antifungals that diflucan belongs to.