Audit or B in class when applying to grad school (mathematics)
It's better to have documentable (whether in transcript or by letters of recommendation) exposure to more substantial mathematics. Especially in the U.S., the default undergrad curriculum in mathematics is far too thin for grad school. Without taking initiative, which necessitates not-the-routine channels, you'd not be ready for grad school. Naturally, the irregularities in the not-routine channels generate grades whose meaning is unclear, and so on. (And, no, summer "research experiences for undergrads" do not typically add much to one's scholarly preparation, although they may fire one's enthusiasm.)

So, for me, when I see "functional analysis" on a transcript, I don't really care what the grade is, nor whether it's "audit" or not. Just the  initiative to engage with it.