You can try using the environment variable like:
export XCURSOR_SIZE="$(gsettings get org.gnome.desktop.interface cursor-size)"
You probably saw this Applications depending on XCURSOR_SIZE and XCURSOR_THEME don't use the correct cursor size and theme (#5894) · Issues · GNOME / gnome-shell · GitLab