Pokemon nicknames in modern games have a limit of 12 characters (source 1 - Bulbapedia), so it makes sense that since the name bar can only fit 12 characters, the actual names of Pokemon can't exceed that.
This complies with the fact that the highest letter count of any Pokemon name is in fact 12 characters, found in the names of Squawkabilly, Poltchageist, Crabominable, and Brambleghast (source 2 - whatever this is).
The 12 letter limit does not count spaces, but there are still no Pokemon that exceed 12 including spaces. There are some that achieve 12 if you count spaces, however, those being Brute Bonnet, Flutter Mane, Gouging Fire, Iron Boulder, Iron Jugulis, Iron Valiant, Roaring Moon, Sandy Shocks, Slither Wing, and Walking Wake. (Source 2)
Hope I helped!