Using iMessage with my phone number when I don't have an iPhone anymore
I believe there is not gonna be a timeout. iMessage on macOS has no reason to ask you to log again once you already signed-in.

However, I advise you to link a mail address, because in case your mac gets into trouble, I think you will have a hard time to get everything back with your phone number only.

Edit: In that last case, I guess the Apple Support will be your friend.