Your approach does not work: you can't force all the variables to "double" at once using only context-free rules.
As the other answers show, your effort is futile: $L$ is not context-free, so there can be no such grammar.
For reference, context-sensitive rules allow you to control the "doubling". Idea: move markers through the sentence; only with the marker can doubling rules be applied. A second marker triggers termination.
Try for yourself to translate this idea into a grammar!
No luck? here goes:
$\qquad\begin{align*} S &\to \$ A \$ \\ \$ A &\to \$ \bullet A \mid \circ A \\[1ex] \bullet A &\to AA \bullet \\ \bullet \$ &\to \$ \\[1ex] \circ A &\to a \circ \\ \circ \$ &\to \varepsilon\end{align*}$
Note:
- The first rule sets up end markers.
- The second rule(s) spawn the two markers; only one $\circ$ can be spawned!
- Markers can only move to the right, and are absorbed by the last end marker.
- Markers can not overtake each other.
I'll leave a formal proof of correctness as an exercise; see here for some ideas.
Hint: Each marker is a "phase"; you have $k-1$ $\bullet$-phases that generate $A^{2^k}$, then a single $\circ$-phase that translates all $a$ into $A$.