It's very difficult to say, it probably will be OK, it depends on the rest of the circuit.
But why not simply move the protection diode and keep it across the solenoid?, it will definitely be OK then.
But why not simply move the protection diode and keep it across the solenoid?, it will definitely be OK then.