When interpreting machine learning models, should preprocessing steps be considered as part of "model"? Suppose I have some inputs on which I first apply some feature engineering and then apply a machine learning algorithm such as random forest to make predictions.

Now, if I want to interpret/explain the model for example using perturbation importance or partial dependence plot etc, should I consider the whole feature engineering step and random forest as one model or should I only try to explain the random forest using the model explainability methods. The problem with the second approach is that the features going into the random forest are transformed and it is difficult to interpret them. What is the formal way?

Depending on what exactly the preprocessing steps are. If you have applied PCA and then feed the principal components as features to the random forest model, then by design you have greatly reduced the interpretability of the machine learning model due to the preprocessing. This is one drawback of applying preprocessing method like PCA.
However, there are other types of preprocessing where the reduction in interpretability isn't as serious.
