Addressing prior dependence in hierarchical Bayesian modeling for PTA data analysis I: Methodology and implementation