Even if you were to accept the premise of 'it's the same car', pricing gets much closer when they're comparable and you option the Z4 with some key things from the Supra. The most obvious one being that the Supra is equivalent to the SDrive 30i, not 20i.
A Supra 2.0 Pro is £45,995
A Z4 with the 30i Engine and M Sport Trim is already £44,320, not £38,000.
Then it gets more complicated - if you want the adaptive suspension and sports diff, you need M Sport Pro for another £1,950 but this also adds 19" wheels which you can't option on a 2.0 Supra.
You could probably mess about for hours making them as identical as possible but the main point is they're very similarly priced cars really, there is only a £7000 gulf if you're buying a Z4 that's not on par with the Supra.