If you rewrite $n=a^{mk}$ then the problem becomes $ 2^{a^m(a^{m(k-1)}+1)}\equiv a^k \pmod{p} \\ 2^{a^k(a^{k(m-1)}+1)}\not\equiv a^m \pmod{p} $ Then considering Fermat there's a good chance that $p-1\mid a^{\min(m,k)}$, $p-1\mid k$ and $p-1\nmid m$ will work provided $a\not\equiv 0,1 \pmod{p}$.
For example, for any prime with $a=p-1$, $m$ odd and $k$ a multiple of $p-1$ is a family of solutions. Or if $a=2p-2$ is a primitive root mod $p$ then any $m$ not a multiple of $p-1$ works.
There are other variants possible like your last example where $a\equiv -1 \pmod{p-1}$ and $a\equiv -2 \pmod{p}$ which generates solutions of the form $2^{1+1}\equiv(-2)^2\not\equiv(-2)^4\pmod{p}$ There is a family like this is taking $a\equiv -1\pmod{p-1}$ and $a\equiv 2^h \pmod{p}$ with $k=1$ and $m$ even, yielding solutions of the form $ 2^{1+1}\equiv 2^h \not\equiv 2^{hm} \pmod{p} $ for example if $p=11,a=59$.
Another family of possibilities is if $p-1\mid a^{m(k-1)}+1$. If we can find $x^h\equiv -1 \pmod{p-1}$ with $h>2$, then generally speaking $a\equiv x \pmod{p-1}$ and $a\equiv 1 \pmod{p}$ can work with $m=h,k=2$. For example, $p=173, a=1039, m=3, k=2$.
These are three ways to generate a large number of solutions. I may have glossed over some conditions for my constructions. But I don't have much hope that we establish precisely "all solutions," as there should be other families I have missed, and I think there may also be special cases.