Here's a solution for $n=3$, with products 30, 56, and 216:
5 2 3
1 7 8
6 4 9
$n=4$, with products 6240, 672, 2520, and 1980:
13 16 3 10
4 6 14 2
8 7 5 9
15 1 12 11
$n=5$:
17 2 7 15 20
14 25 9 11 16
6 21 13 3 12
10 22 18 23 1
5 24 4 8 19
$n=6$:
34 10 5 30 27 14
25 19 36 11 7 2
18 33 29 4 20 8
3 35 22 31 32 9
15 12 16 21 17 26
28 1 6 24 13 23
$n=7$:
5 38 1 26 40 44 24
19 29 22 28 6 20 35
10 11 31 36 46 3 2
32 42 18 37 39 7 21
13 25 23 9 41 34 48
33 14 4 12 17 43 45
16 8 30 49 15 27 47
$n=8$:
37 8 5 63 24 18 31 30
12 38 19 48 58 3 15 39
2 57 41 14 44 51 10 60
7 6 45 43 40 9 49 22
50 29 11 33 47 46 56 64
54 27 32 1 23 53 17 13
62 20 34 21 28 4 59 35
36 26 42 25 55 52 16 61
$n=9$: infeasible
$n=10$:
53 46 45 31 68 24 20 72 18 65
78 89 64 69 33 75 57 14 8 49
93 100 67 81 32 41 4 94 98 74
15 91 62 83 90 10 84 11 6 23
34 66 21 26 79 86 12 13 36 60
30 1 82 70 43 59 88 50 99 17
40 56 63 2 9 44 97 38 95 58
16 76 47 25 52 77 87 71 48 3
27 54 80 28 7 51 19 96 73 55
92 42 37 22 39 5 35 29 85 61
$n\in\{11,12,13\}$: infeasible
I used the following integer linear programming formulation. Let binary decision variable $x_{i,j,k}$ indicate whether cell $(i,j)$ has value $k$. You can use any objective function, and the constraints are:
\begin{align}
\sum_k x_{i,j,k} &= 1 &&\text{for all $i, j$} \tag1\label1 \\
\sum_{i,j} x_{i,j,k} &= 1 &&\text{for all $k$} \tag2\label2 \\
\sum_{j,k} \log(k) x_{t,j,k} &= \sum_{i,k} \log(k) x_{i,t,k} &&\text{for all $t$} \tag3\label3
\end{align}
Constraint \eqref{1} forces each cell to contain exactly one value. Constraint \eqref{2} forces each value to appear in exactly one cell. Constraint \eqref{3} forces row $t$ and column $t$ to have the same product.
A numerically preferable alternative (with integer coefficients) to \eqref{3} is to let $P$ be the set of primes smaller than $n^2$, let $$k = \prod_{p\in P} p^{m_{k,p}}$$ be the prime factorization of $k$, and impose linear constraints
\begin{align}
\sum_{j,k} m_{k,p} x_{t,j,k} &= \sum_{i,k} m_{k,p} x_{i,t,k} &&\text{for all $t$ and $p$} \tag4\label4
\end{align}
The idea is that row $t$ and column $t$ have the same product iff, for all $p$, prime $p$ appears with the same multiplicity in that row and column.