Logging into an account and redownloading its purchases is likely to tie the device to that account for 90 days : View and remove your associated devices in iTunes - Apple Support
You could consider putting both accounts into a Family Share which won't (or shouldn't) have that issue.
(Songs no longer in the store you won't be able to redownload, nor if you've moved countries since buying them. And if you've hidden any of them you will need to use a computer's iTunes to unhide them.)