Yes, these should be the same, when upsampling results in the same number of duplicates per sample (provided you're correctly doing the upsampling only inside the training set). The idea is that the impurity/loss at a node is computed with a multiplier either from the class weights or from the number of duplicated samples, and that these are the same (when the weights are rational and the upsampling is made to match those ratios; otherwise, upsampling will happen on a random subsample, and that will be slightly different than weighting).
Here's a notebook (github/colab) that shows the resulting models are the same, at least in a smallish toy example. (Note that at the beginning I duplicated some of the majority class as well, so that the imbalance ratio was integral, and I could nicely upsample the minority class to equal size.)