The quantization prescription
$$ [\hat{x},\hat{y}] := \mathrm{i}\hbar\widehat{\{x,y\}}\tag{1}$$
for $x,y$ two classical phase space coordinates does have its subtleties. In particular, as the answer in the linked question says, it leads to inconsistent results when applied to e.g. polar coordinates. The reason for this is two-fold:
For the radial coordinate $r$, the naive operator $\frac{\hbar}{\mathrm{i}}\frac{\partial}{\partial r}$ is not self-adjoint on $L^2([0,R],\mathrm{d}x)$ due to mismatched domains of it and its adjoint. However, rendering it self-adjoint in the minimal way does not resolve the problem because
We should not be using the Poisson bracket in the first place.
Why not, you may ask, and why does it usually work, anyway? We should not be using it because the Groenewold-van Hove theorem says that no quantization procedure can consistently provide a map from classical phase space functions $f$ to quantum mechanical operators $\hat{f}$ such that
$(1)$ holds
for every polynomial $p$ we get $\widehat{p(f)} = p(\hat{f})$ for every phase space function $f$
Operators which commute with everything are multiples of the identity (irreducibily of the representation of the algebra of observables)
So, we must give up one of these, and one way that yields the correct quantized theory even for e.g. polar coordinate choices is using the prescription
$$ [\hat{x},\hat{y}] := \mathrm{i}\hbar\widehat{\{\{x,y\}\}}$$
where the doubled curly brackets now indicate the Moyal bracket, which is a deformation of the Poisson algebra with parameter $\hbar$ such that it agrees with the Poisson bracket to first order:
$$ \{\{f,g\}\} = \{f,g\} + \mathcal{O}(\hbar)$$
This approach is known as deformation quantization, and inspecting the explicit definition of the Moyal bracket (given in the linked Wikipedia article) in canonical cartesian coordinates (since it is not preserved under canonical transformations), one sees that it agrees with the Poisson bracket if applied to Cartesian coordinates $x,p_x$, but gives higher order corrections to the bracket of polar coordinates, explaining why the naive canonical quantization fails for polar coordinates.