What could be possible reasons for sex to become a time-varying covariate? I was fitting a Cox PH model with BMI as the main predictor, time to death as outcome, and age, sex, blood pressure, heart rate, cholesterol, smoking status, diabetes and use of antihypertensive medication as covariates.  I performed the chi2 GOF to test for the PH assumption, and found that sex is a time-dependent/varying covariate... which I found very strange.  What could be possible causes for this?  Is it the quality of the dataset?  Or is this a limitation of the chi2 GOF test?

What you report isn't that sex is a time-varying covariate. It presumably is constant for each individual over all times in  your study.
What you found with the proportional-hazards tests is that the regression coefficient for sex appears to change with time. For example, the outcomes might be about the same for both men and women at early times, but at later times men tend to have worse outcomes even when all of the other covariates are accounted for. That would show up as a low regression coefficient (hazard ratio, HR, near 1) at early times but larger (high male/female HR) at later times. That's along the lines of what @Dave suggested in a comment.
The time-dependence vignette of the R survival package is a helpful introduction to this distinction and how to handle both time-varying covariate values and time-varying regression coefficients.
