Generally, we don't define determinants in this way. This method for computing the cross product something known as a mnemonic: a pattern used for remembering something complex. It's not a coincidence that it works, of course, but at the same time, it's not a real determinant.
If you wanted to define a more general non-homogeneous determinant, then you'll have to look at the reasons why it's well-defined. Between scalars $\Bbb{R}$ and vectors in $\Bbb{R}^3$, we have a multiplication operation
$$a \cdot (x_1, x_2, x_3) = (ax_1, ax_2, ax_3).$$
The scalar multiplication operation is inherently asymmetric, so we can also symmetrise the operation by defining $v \cdot a = a \cdot v$ for all $v \in \Bbb{R}^3$ and $a \in \Bbb{R}$, which forces a kind of commutativity.
This scalar multiplication operation acts sort of associatively with scalar multiplication on $\Bbb{R}$, specifically
\begin{align*}
b \cdot (a \cdot v) &= (ab) \cdot v \\
b \cdot (v \cdot a) &= (b \cdot v) \cdot a \\
v \cdot (ba) &= (v \cdot b) \cdot a .
\end{align*}
We also have distributivity laws
\begin{align*}
a \cdot(u + v) &= (a \cdot u) + (a \cdot v) \\
(a + b) \cdot v &= (a \cdot v) + (b \cdot v).
\end{align*}
All in all, this builds up a partial ring structure on $\Bbb{R}^3 \cup \Bbb{R}$ where not every element of the set can add or multiply to each other, but the associativity, commutativity, and distributivity all hold. Plus we have some partial additive identities (i.e. $0 \in \Bbb{R}$ and $(0, 0, 0) \in \Bbb{R}^3$ each act as identities for the two parts of the set $\Bbb{R} \cup \Bbb{R}^3$), and associated additive inverses.
It's not a ring, because we don't get closure of addition and multiplication. We cannot multiply two vectors, and we cannot add a scalar to a vector. But, provided we avoid performing these operations, the structure is very much ring-like.
Thus, we can define the determinant of a matrix with elements from $\Bbb{R}^3 \cup \Bbb{R}$, so long as we ensure that no vectors product with vectors, or add to scalars. The given determinant is fine, evidently, but these two determinants are not:
$$\begin{vmatrix} i & j & 1 \\ 1 & 2 & 1 \\ -1 & 0 & 3 \end{vmatrix}, \quad \begin{vmatrix} i & 2 & 0 \\ 3 & j & -1 \\ 0 & 2 & k \end{vmatrix}.$$