agma:

Can anyone understand why the accuracy is 50%?


Your model is now overfitting the positive classes so you might need to reduce the pos_weight value.
How did the confusion matrix look before adding the weight?