There can be theatrical contexts. For example I recently attended performances of Amiri Baraka’s* The Dutchman and The Slave. In both plays that particular racial slur is written into white character’s parts.
Other times you just have to ditch it. For example I’m in a local community choir which is getting ready to perform Dave Brubeck’s The Gates of Justice. The score contains three shouted racial slurs including the enword. When I first got the score and saw that I said to myself, “No. Just no.” The first email from the director said something like, “The objectionable text at letter F is being addressed.” The passage is only a second or so. We are just skipping it. Problem solved.
*Formerly LeRoi Jones, ICYDK.