So you are running into an issue with the maximum size for a single term. When you set a field to not_analyzed it will treat it as one single term. The maximum size for a single term in the underlying Lucene index is 32766 bytes, which is I believe hard coded.
Your two primary options are to either change the type to binary or to continue to use string but set the index type to “no”.