The gates to a communal gardens are set to be locked overnight to deter antisocial behaviour