Let $\mathfrak{g}$ be a complex semisimple Lie algebra of rank $r$. Let $\mathfrak{g}^{\mathrm{reg}}$ be the set of $X\in\mathfrak{g}$ whose centralizer $Z_{\mathfrak{g}}(X):=\{Y\in\mathfrak{g}:[X,Y]=0\}$ has dimension $r$ (called the set of regular elements here).
Question. Can we find polynomial maps $$f_1,\ldots,f_r:\mathfrak{g}\to\mathfrak{g}$$ such that for all $X\in\mathfrak{g}^{\mathrm{reg}}$, $\{f_1(X),\ldots,f_r(X)\}$ is a basis for $Z_{\mathfrak{g}}(X)$?
The answer is trivially yes for $\mathfrak{g}=\mathfrak{sl}(2,\mathbb{C})$. Simply take $f_1:\mathfrak{sl}(2,\mathbb{C})\to\mathfrak{sl}(2,\mathbb{C})$ to be the identity map.
Using Mathematica, I also found two such polynomials $f_1,f_2$ for $\mathfrak{g}=\mathfrak{sl}(3,\mathbb{C})$, but they are a bit too messy to write down here.
Edit. In other words, if we let $$E=\{(X,Y)\in\mathfrak{g}^{\mathrm{reg}}\times\mathfrak{g}:[X,Y]=0\}$$ then $E$ is a vector bundle of rank $r$ over $\mathfrak{g}^{\mathrm{reg}}$ and the question is if it is trivial in the algebraic category.