No, this can never happen: seeing this when the complex domain is the polydisc requires the understanding of what its topological boundary is, so we'll precisely do this, and prove the statement by reductio ad absurdum.
Let's start by giving the following definitions:
- $\Bbb D_i =\{z_i\in\Bbb C\mid |z_i|< 1\}\triangleq \Bbb T_i$ is the open unit disc on the $i$-th complex plane of $\Bbb C^n$, $i=1,\ldots, n$,
- $\overline{\Bbb D}_i =\{z_i\in\Bbb C\mid |z_i|\le 1\}$ is its closure and
- $\partial \Bbb D_i =\{z_i\in\Bbb C\mid |z_i|= 1\}$ is its boundary.
We have that
- $\Bbb D^n\simeq {\Bbb D}_1 \times \cdots \times {\Bbb D_i}\times \cdots \times {\Bbb D}_n=\times_{i=1}^n \Bbb D_i$ is the ordinary unit polidisc,
- $\Bbb T^n\simeq \partial{\Bbb D}_1 \times \cdots \times \partial{\Bbb D_i}\times \cdots \times \partial{\Bbb D}_n=\times_{i=1}^n \partial{\Bbb D}_i =\times_{i=1}^n\Bbb T_i$ is its distinguished boundary i.e. the $n$-torus,
- $\Gamma_\nu= \overline{\Bbb D}_1 \times \cdots \times \partial \Bbb D_\nu\times \cdots \times \overline{\Bbb D}_n$ is its $\nu$-boundary sheet, $\nu=1,\ldots, n$.
Finally, we have that the topological boundary of the unit polydisc is the union of all $n$ of its boundary sheets
$$
\partial \Bbb D^n =\bigcup_{\nu=1}^n \Gamma_\nu
$$
As we can see, $\Bbb T^n\subsetneq \partial \Bbb D^n$.
Now assume that there exists a non constant function $f$, holomorphic on $\Bbb D^n$ and continuous on $\Bbb D^n\cup \partial \Bbb D^n$, that has a maximum on a boundary point $z_0=(z_{01},\ldots, z_{0n})\in \partial \Bbb D^n \setminus \Bbb T^n$. This means that at least one of its complex coordinates, say the $k$-th one, does not belong to $\partial {\Bbb D}_k$ but instead belongs to the interior of $\overline{\Bbb D}_k$ i.e. to ${\Bbb D}_k$. But then we are done, since now we can define a function $f_k$ as
$$
f_k(z_k)=f(z_{01}, \ldots,\underbrace{z_k}_k, \ldots, z_{0n})=f(z)|_{\substack{z_i=z_{0i} \\i\neq k}}
$$
which is a function of one complex variable on the disk ${\Bbb D}_k$ (that a holomorphic function of several complex variables is holomorphic respect to each of its single variables is the elementary converse of Hartogs'lemma) which is continuous on $\overline{\Bbb D}_k$ and moreover reaches a maximum on an interior point of ${\Bbb D}_k$, which is impossible in view of the standard maximum principle of functions of a complex variable. Thus
$$
\max_{z\in \Bbb D^n\cup \partial \Bbb D^n} f(z) = f(z_0)\implies z_0\in \Bbb T^n.
$$