What is your connection string ?
Are your SQL Server and OS updates current or hotfixed ?
The second MS document, dated Apr 17, 2018, states
This error will not happen if you specify any value that is outside the range of 4001 to 8000 for Sqlparameter.size.
and
Status: Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section. This is scheduled to be addressed in the next major release of .NET Framework