I was troubleshooting a code block element issue with the Avada theme for WordPress.  At part of that troubleshooting, I found some documentation that mentioned a Theme Option settings to enable or disable Code Block Encoding.  If the feature is turned on, it will prevent WordPress from inserting formatting changes.