Solution 1:

I think the center $Z(\mathrm{GL}_{2}(\mathbb{R}))$ in your bijection should be replaced by its identity component $Z(\mathrm{GL}_{2}(\mathbb{R}))^{\circ}$.

Otherwise you will get the bijection: $$\pm\mathrm{Id}_{2}\mathrm{GL}_{2}(\mathbb{Q})\backslash\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})^{1}\simeq\mathrm{GL}_{2}(\mathbb{Q})Z(\mathrm{GL}_{2}(\mathbb{R}))\backslash\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}}),$$ where $\pm\mathrm{Id}_{2}\in\mathrm{GL}_{2}(\mathbb{R}).$

Consider the composition $\varphi$ of the embedding $\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})^{1}\hookrightarrow \mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})$ with the quotient morphism $\mathrm{GL}_{2}(\mathbb{A_{\mathbb{Q}}})\rightarrow \mathrm{GL}_{2}(\mathbb{Q})Z(\mathrm{GL}_{2}(\mathbb{R}))^{\circ}\backslash\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}}).$

The kernel of $\varphi$ is $\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})^{1}\cap \mathbb{GL}_{2}(\mathbb{Q})Z(\mathrm{GL}_{2}(\mathbb{R}))^{\circ}$. Notice that $\mathrm{GL}_{2}(\mathbb{Q})$ is contained in $\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})^{1}$ naturally. An element $\mathrm{diag}(r,r),r>0$ in the center of $\mathrm{GL}_{2}(\mathbb{R})$ is in the kernel of $\varphi$ if and only if $r^{2}=1$, thus $\ker\varphi\cap Z(\mathrm{GL}_{2}(\mathbb{R}))^{\circ}=\mathrm{Id}_{2}$. So $\ker\varphi=\mathrm{GL}_{2}(\mathbb{Q}).$

On the other side, for any $X\in\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})$ its norm $|\det X|$ is a positive number. Take $r=\sqrt{\det X}$ and then $\mathrm{diag}(r,r)^{-1}X\in\mathrm{GL}_{2}(\mathbb{A}_{\mathbb{Q}})^{1}$, which implies that $\varphi$ is surjective and we obtain the bijection between these two quotient spaces.