I had an issue with running site-install on a Drupal 9 site where the exported views in the config/optional directory were not being imported.

After some diagnosis, the reason is that there was a change and now the optional config is imported before the install profile is activated - See change record - https://www.drupal.org/node/3118908

My problem was there were user roles in the config/install of the profile that the exported views depended on.

Removing the roles from the views permissions solved the problem and is the last hurdle porting the StratosERP system across to Drupal 9, expect more on that in the next few days.