Shouldn't it be 仕方がないな? And what is the function of な?
The context is:
Japanese Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language. It only takes a minute to sign up.Sign up to join this community
Some particles are often omitted in speech (は, が, を, occasionally に), so 仕方ない is a spoken variant of 仕方がない. Example: これあげるよ. (を is omitted)
The sentence-final な is somewhat related to sentence-final ね. Whereas ね is involving the listener as well, often by asking for their confirmation or agreement, な is used to mark "self speech" that doesn't really involve the listener. E.g. "Huh, so it's like that" (thinking to oneself)
The following is a comparative translation that exaggerates the nuance to make it more explicit:
"仕方ないな" = Oh well, I guess it can't be helped. (B accepts the excuse)
"仕方ない（よ）ね" There's nothing you could have done, right? (B is looking for A to reaffirm them - this is unnatural in the dialogue you gave.)
"な" is used often by men, whereas ね is used by all genders.
I just found some information in my textbook, I think may help other people, especially the な．
仕方ない is a standalone adjective word.
な is an interjection for talking to oneself, since one is talking to oneself, don't need the polite form, just the plain form.
when you say it long, it became なあ, like ah VS aaaah.