Yes, if the activity occurs while you are outside U.S., then you can get paid for it without having to have U.S. work authorization to do it. So, yes, recording an album while outside is fine but it becomes a little more complicated if you are now getting paid for downloads while you are in the U.S.
While I'm inside the US, can I perform work for non-US entities? For example, remotely teaching a music lesson do someone in a different country or writing a book and publishing it abroad but not in the US.