In general, there are a few ways to highlight derivative of the function, like $\frac{d}{dx}, \; f'(x), \; \frac{\partial}{\partial x}, \; f'_x$ etc.
However, the question touches another context. For example, let a polynomial function $f(x)$ be explicitly defined as follows
$$f(x) = x^n, \quad x\in N, \; n\in N$$
This way it is normal to use ordinary derivative operator, since there is only 1 argument in function $f(x)$,
$$\frac{d}{dx} f(x).$$
However, assume that there is no explicit definition of function $f$, and it is necessary just to denote derivative of polynomial $x^n$ over $x$, which of above is correct way to do it:
$$\frac{\partial}{\partial x} x^n$$
Or
$$\frac{d}{dx} x^n, \quad n = const ?$$
Or maybe another thing ?
It is quite unusual that when you write $$x^n,$$ $n$ be silently a function of $x$ or other variables.
Either you should state it or write
$$x^{n(x,y)}.$$
So in normal times
$$\frac{d}{dx}x^n$$ is unambiguous and partials would be confusing, while if $n$ is not independent of $x$,
$$\frac d{dx}x^n$$ and $$\frac\partial{\partial x}x^n$$
denote two different things.
In fact, you don't have to say that $n$ is constant; you have to warn when it is not.