Unfortunately the runmode doesn't get picked up by these automatically. You have to update the Resource Resolver configuration to point to your custom mapping path. Per the doc [1]:
You can use /etc/map.publish to hold the configurations for the publish environment. These must then be replicated, and the new location (/etc/map.publish) configured for the Mapping Location of the Apache Sling Resource Resolver of the publish environment.
[1] Official doc reference: Resource Mapping
Instructions:
1. Go to http://{aemhost}/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl
2. Log in as admin
3. Update the Mapping Location
4. Save
5. That would generate an OSGi configuration file in the Oak repository under /apps/system/config.
6. You can then make copies of that configuration with your required paths for each environment under runmode enabled config folders of your application. For example:
/apps/myapp/config.devpublish/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl.config