Compositional Score Modeling for Simulation-based Inference