Left-right SU(4) vector leptoquark model for flavor anomalies