The issues is that file gets regenerated and my changes are lost anytime a composer:install is run. My plugin is below. Can anyone help me understand why my plugin isn't be called globally, unless I add my plugin to the apps main di.xml file? Also, is there anyway to ensure my plugin get installed first before any non-magento plugins? I need to set a local mysql sessions variable to get around my managed hosts global settings, and and need to make sure my plugin is always installed before other plugins are added. This issue would come up during an initial install(If another plugin was installed and tried to create/modify a table) in my case.
* Add Sql sessions variables afterSetup
public function afterStartSetup(AdapterInterface $subject, AdapterInterface $result): AdapterInterface
$subject->query('SET @@local.sql_require_primary_key = OFF');