The key issue is, if you want to deposit it to Dubai bank after you sold property, then youre ok. But afterwards, if you want to transfer it outside of UAE, you will need to show proper documents regarding how did you got that money to buy that apartment at the first place.
And yes ofcourse you...