Hi @Raj-iv ,
Have you Checked the Suggestions in the below post. There might be variables which are outside of the scope being overwritten or may be the variables are not of a Serializable Type :
Also, we already have a Template of Document Understanding Ready to be used Present in the Templates Section of Studio :
