Hi,
Two reasons are coming to my mind:
1.It looks like Logic is sending CC122(=127) somehow on project template loading which set the Local Control to ON via midi.
2. There is some hardware setting in the HP 307 which turns ON the Local Control automatically when you connect the device via midi to any DAW, other devices etc something like that...
Here is an alternative idea you can try in Logic in case you can not define the main reason which causing that:
1. Open the Logic Environment window and navigate to the Environment layer where is the HP 307 External Instrument object (it can be a Standard Instrument or a Multi Instrument).
2. Go to the environment menu "New" -> fader -> button to create a new environment button.
3. Select the button and change its output "-1-" default definition from 7 to 122.
4. Cable the button to the External Instrument object.
5. Go to the Logic Project Settings ->Midi->General->Miscellaneous and check/thick the box labeled as "All fader values".
6. Save the project as template.
On the next application loading Logic has to send CC122 =0 control change midi message (Local Control OFF) to the device.
Regards,
A.G