This paper presents an innovative approach to solving a recently introduced equation labeled the ( \( 2+1 \) ) \(\mathfrak {q}\) -deformed tanh-Gordon equation ( \(\mathfrak {q}-\) DTGE). We will handle this equation in its fractional form utilizing the optimal homotopy analysis approach combined with the \(\mathbb {J}\) -transform to derive approximate solutions with high accuracy. The \(\mathfrak {q}-\) DTGE has significant potential in various scientific applications, it is utilized in the field of condensed matter physics and sometimes used to describe the transmission of solitons through optical fibers; generally, it is used in studying physical systems with violated symmetries. A detailed analysis for the convergence of the solution is performed to guarantee the precision and reliability of the solutions. Additionally, we illustrate the solutions with 2D and 3D graphs to highlight their characteristics and the effects of parameters on the solution. Our results clarify that the combination of the optimal homotopy analysis and the \(\mathbb {J}\) -transform generates a powerful technique for solving nonlinear fractional differential equations.