Though I tend to do something rather along the lines of vif
(using evil's defun
text-object, or evil-treesitter if that's what you prefer) I tried what you indicate and it does work here…
So, could you be a bit more precise in what you're trying to do and how it fails? (a file example, trying without other packages than evil, etc.)