I’m necroposting here, but I came across a similar sort of conundrum a long time ago with Nounな+わけ and was thoroughly confused at the time.
It’s not really that every noun can act like a な-adjective, but rather that 形式名詞 , AKA dummy/formal nouns (ones without substantive meaning in larger contexts, think もの、はず、くせ、ため, etc.) have a greater tendency to accept modification/attribution from nouns with な. In this sense, な is no different from using the である form of the copula instead.
However, this doesn’t really apply to the question at hand…
In the case of だけ, it’s slightly different. だけ in this context is not actually a noun, but rather a particle, so it doesn’t take modification in the same sense as the dummy nouns described above. Think about it the same way as constructions such as「それなので、…」or「今日は休みなのよ」.
These kinds of particles (e.g. の、ばかり、ほど、だけ) can be viewed as sort of noun-like in function (I think the grammatical term is 準体助詞). However I think it’s more apt to say that they simply attach to attributive forms of verbs/the copula (and な is the attributive form of だ) rather than being directly modified by whatever noun precedes them. Essentially, they act on the entire phrase they’re attached to, the entire phrase becoming a sort of noun-like unit (like with verb nominalization).
So for 「仲良しなだけあって」、 だけ is essentially acting on this phrase 「仲良しだ」. However, since だ can only be used at the end of a sentence, we end up conjugating it to な.
If we think about this situation in the past tense, it becomes a lot clearer, because だった is already in its attributive form. e.g.:
ただ、仲良しだっただけだ。
It’s simply that we were friends.
There’s another good example in the だけに lesson where な is used after a na-adjective, but still illustrates how だけ acts on the whole phrase that precedes it and not just the adjective:
賞金が高額なだけに、応募者が殺到しています。
As one might expect from the prize money being a large sum, applicants are flooding in.
The side note on the top answer to this StackExchange question goes into a little more detail about where な is acceptable to use: grammar - Can every noun be a na-adjective? - Japanese Language Stack Exchange
Also, this doesn’t apply to particles like の or だけ、but in the case of nounな+dummy noun, your next question might be, “well, why use な instead of の?”
I’ve asked Japanese people this, and never got a clear answer. There doesn’t seem to be any difference in nuance, as it has been explained to me. In these situations, な is essentially just acting like である (in an attributive function), so you could really use any of the three, I guess. You probably just have to get a feel for what is and isn’t natural to say.
From a hinative thread:
Nの(Nである) + わけ(が)ない
Nな(Nである) + わけ(が)ない
名詞の場合には、「の」「な」「である」などが使われます。
部長のわけがない
部長なわけがない
部長であるわけがない
猫のわけがない
猫なわけがない
猫であるわけがない
edited for clarity