Sklearn: applying cost complexity pruning along with pipeline
Pipelines themselves don't generally carry the methods and attributes of the final estimator, aside from basics like predict, predict_proba, transform.  If you need to access a method of a step, you should access the step itself using one of:
pipe[-1]
pipe['decisiontreeclassifier']
pipe.named_steps['decisiontreeclassifier']

However, in this case it's a little trickier, because cost_complexity_pruning_path needs the dataset X, y, but you need your pipeline's transformer to apply to it first.  It's a little cumbersome, but I think this should work and is relatively straightforward:
pipe[-1].cost_complexity_pruning_path(
    pipe[:-1].transform(X),
    y,
)

(Note that pipe[-1] is the final estimator in the pipeline, and pipe[:-1] is every step except the last.)