Hi. Yes, that should be ok. Personally, I would use more attenuation at the output and keep the VNA input level around 0 dBm, because the VNA signals tend to be cleaner between -20 dBm and 0 dBm. The VNA probably won't be able to drive your PA hard enough to make it reach 40 dBm anyway - not without the use of a pre-amp... and of course, that would have to be included in the calibration.
Judging by the amount of gain, I'm guessing this is a single-stage PA, which means you won't need to worry about the stability of individual stages. I'd recommend that you use a -20 dBm input signal and just look at the stability at small-signal. If K > 1 and you don't see any spikes in the S11 or S22 that look like they are close to going > 0 dB, then that's probably enough to suggest your PA is stable.
For large-signal power measurements, I'd always use a signal generator and a power meter and measure the output power at several frequencies and only use the VNA for small-signal testing. Of course, it's up to you how you test your design - just make sure that your output power will always been attenuated well below the maximum rated input level of the VNA, spectrum analyser or power meter. Oh and make sure your attenuator is also rated for at least 40W!