My understanding is there is no border control between the 7 emirates. Indeed, you'd be hard pushed to know when you've actually crossed from Dubai to Sharjah. I'm happy to be corrected, but IMHO once you're in, you're in, and I've never had a problem entering at SHJ and leaving from DXB.
This is as a UK passport holder though.