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 :
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.