We would love to help you with your query, however, your query is related to SharePoint development,
It's not really a development question, it's a question about why out of the box functionality is not working. In classic sites you could always apply a custom stylesheet using this method with no development effort. Msft should either follow best practices and upgrade the classic features for real or remove them completely. A competent company would never do an "upgrade", but leave traces of non-working components in place.
Kem104-not sure if you're only working with classic sites but if you switch to modern you can add your own stylesheet with this script injection SPFx app: https://github.com/pnp/sp-dev-fx-extensions/blob/main/samples/react-application-injectcss/README.md