Can we change op-amp inputs when using virtual ground?
Neither of your circuits have a virtual ground.



Figure 1. The non-inverting input of the inverting op-amp is a virtual ground. Source: Electrosome.


In this case the op-amp output adjusts to bring the inverting-input to the same voltage as the non-inverting input.
Since the non-inverting input is at ground potential then so is the inverting input.
Since the inverting input is not actually connected to ground we call it "virtual ground". For all calculations we can consider it to be ground.