This behavior, and solutions, is documented in several places, including here by Laurent Leturgez and here by Danny Bryant. Most noticeably, it occurs when the Perl scripts are run during the creation of a multitenant database using dbca.
The problem hit me hard using virtual computers during a customized Oracle boot camp I am teaching as I write this. The purpose is to document what I found out and how I decided to fix it.