Hi,
Which version of Studio and UiPath.System.Activities package do you use?
InvokeCode activity in UiPath.System.Activities package 21.10 (or higher) doesn’t support Studio 21.4 or lower as the following document.
So, If your environment is like the above, can you try upgrade your Studio to 21.10 etc OR downgrade System.Activities package to 20.10 etc.
Regards,