Tunable entanglement of two-qubit XY model with in-plane magnetic fields