You can switch your runtime(app/munit) anytime but it should not be lower than minMuleVersion defined in your mule-artifact.json file.
By default, MUnit runs in studio with the version of the project’s server. You can override this version, by specifying the patched runtime version in the MUnit run configuration:
Menu-->Run --> Run Configurations
Under MUnit, select your MUnit test file.
Type the MUnit patched version you want to use in the Mule Runtime Version field, under Advanced Settings or here you can reload from plugin added to your pom.
Below is the error if you define your minMuleVersion to 4.2.0 and you are trying to deploy your code in 4.1.5
org.mule.runtime.api.exception.MuleRuntimeException: Artifact hello requires a newest runtime version. Artifact required version is 4.2.0 and Mule Runtime version is 4.1.5