Modelling aggregated data from different studies

Hello,

I have data that has originated from four separate studies. Each study examines the effect of a different medication on treatment response. All four studies have the same baseline variables and outcome variable (treatment success). Beyond classifying treatment success using the baseline variables, I am wanting to determine which baseline variables are most important in classifying success to each of those four medications. I am planning to do this using a workflow set of different algorithms (xgboost, random forest, svm), finalising the best performing workflow and examining variable importance.

I am unsure of how best to compare across the four medications with regard to variable importance. Would it be best to collate all the data and run one model with interaction effects between each medication and each baseline variable, or run four separate models (one for each medication) and compare the importance of variables across the four models, or do something else? I'm not sure whether the first approach would allow me to isolate the importance of specific variables for each medication.

Any ideas on how best to tackle this would be appreciated, thank you!