Without seeing the specific code involved, it’s hard to diagnose, but while reading the docs for other things I’m working on here, I noticed this post and thought I’d copy/paste a line from it so maybe you can compare your lambda versus the example (from 2021, maybe out of date now)
anim.set_custom_exec_cb(lambda a, v: target.set_x(v))
from this post:
https://forum.lvgl.io/t/getting-the-animated-object-in-custom-exec-cb/4379/3