This is a very good question.
According to the Question and Answer on the Internet https://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q1189040481 ,
your question is very difficult to explain grammatically even to Japanese（＝日本人）.
The only things that can be clearly stated are:
- That あいにくの occurs more frequently than あいにくな as an adjective.
- In some set phrases such as あいにくなことに, the な form is commonly used.
By your question and by Felipe Oliveira's comment to my answer, I could realize the difficulty of the correct usage of a particular adjective which have both attributes of ノ-adjective and ナ-adjective. I could understand the difficulty that a non-native Japanese may confront in studying Japanese earnestly.
I searched on the Internet for what may help your question. I found some research papers on this theme.
I'll show you some extracts from the two papers.
In the first paper titled 「ナ形容詞とノ形容詞のイメージ」 you could find adjective samples showing the priority between の and な in table 4 (表｛ひょう｝４).
In the second paper titled 「日本語教育における形容動詞の扱い」 the researcher tells that this kind of problem is hard for non-native Japanese.