Please post code that works if it is copied and pasted.
using AbstractAlgebra, Symbolics
R, (x, y) = PolynomialRing(ZZ, ["x", "y"])
C = MPolyBuildCtx(R)
push_term!(C, ZZ(3), [1, 2]);
push_term!(C, ZZ(2), [1, 4]);
f = finish(C) # 2xy^4 + 3xy^2
exponents = f.exps
coeffic = f.coeffs
# Symbolics.jl expression
symbolics_vars = Symbolics.variable.(f.parent.S) |> reverse
symb_f = sum(coeffic[i] * reduce(*, symbolics_vars.^(exponents[:, i])) for i in axes(exponents, 2))
# symb_f = 3y^2*x+2y^4*x
# work with symb_f
Symbolics.gradient(sin(symb_f), symbolics_vars)