My iPhone 5 with R-Sim9 pro does not allow me dial USSD codes.
When I dial it, it treats the USSD code like a mobile number. Is there a way to fix this problem?
It is a problem with your unlocking SIM not with the iPhone.
The easiest solution would be to remove the R-Sim9, have the iPhone unlocked by the (original) provider and then use your SIM card without the R-Sim9.
There is also a fix involving a "CommCenter patch" (via Cydia) and then setting an option called "SupportsSupplementaryServicesOver3GPP" to on (via iFile) but it requires your phone to be jailbreaked.