Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
Thanks for posting your query. There is one important setting in the Rewrite configuration - "Re-evaluate path map". Kindly note if this setting is unselected the original URL path will be used to match the path-pattern in the URL path map. In your case path-pattern will be matched against api.domain1.com/{partnername}/ and post Rewrite **api.domain1.com/**webservicecore will be sent to same backend as selected for partnername.
However, if Reevaluate setting is selected there will be again path lookup through the path map after Rewrite which means after Rewrite again path lookup will be performed for **api.domain1.com/**webservicecore and if there is a different path available for **/**webservicecore that will be selected. This is important setting which is overlooked sometimes and cause the problem.
This is also a common pitfall associated if you apply with the basic routing rule. Kindly you may go through the below link -
Regards
Ujjawal