You could write your custom RandomErasing transformation by changing the get_params method in these lines of code 17 to your specific condition.
This would make sure to samples from your desired area instead of the whole image.