There is most likely not enough space, but one way to lock the Anderson connector is to pass a small zip tie between the wires, then across the connector and between the wires on the other side.
If a small zip tie is too big, you can use a small nylon string to do the same and prevent the...