Nystatin is of natural origin too. It’s produced by bacteria to protect themselves from fungi, or to create room for themselves by killing fungi.
Nystatin does cross the gut wall, though only in low quantities. That’s why it’s very toxic to fungi and hardly toxic to humans. Another reason why it’s not very toxic to humans is that it attacks a certain biochemical compound which is present in the cell walls of fungus cells, but which is not present in the human body.