I am trying to do a Breusch pagan test and I get for two regressions with different dependent variables but with the same independent variables different p-values. Actually, I thought that in the Breusch pagan test, only the independent variables matter and if they are the same in both models, then the p-value should also be the same. Am I right? Why didn't I get for both models the same p-value?

Everything I know about the Breusch Pagan test I just learned from wikipedia.

With that caution in mind, you are testing for heteroscedasticity; whether the variability in the dependent variable is constant across the range of your independent variables.Changing the dependent variable would change the result.