There is not a limit of 400 pages in Google docs as I was able to save google doc file with more than 2k pages.
There seems to be character limit though.
I was able to save 1,53,5692 characters with no spaces in between (as of 21st of August 2020).
However, I did hit enter after every 50,00 characters (otherwise my doc file would not be able to process the string if there was a long string of more than 100k characters. (I am not sure about the exact number but it is between 100k to 150k). I had around 30 line breaks (not spaces) by the time I typed 1,53,5692 characters. Trying to add even one more character would give the same error as the Original Poster is getting.
Hitting enter to create line breaks doesn't count towards the character count. Because, using the word count tool to count the characters after removing some line breaks was not changing the result for character count.
But again, for every line break removed you could actually add one more character.
So, I can say that there is a character limit of approx. 1.53M but the exact number does seem to vary depending on how you have formatted your document.
It's a bit confusing I guess, but Hope this helps!