Each brokers may have setup expiration dates for Demo accounts. It can be 7, 15, 30 days or more, after the last activity.
To keep your Demo account semi-permanently, you need to login at least once during the period.
Or a broker may be able to clear out the limitation if you request for that.
You can also create a Demo account directly from Spotware which has no expiration dates, but it wouldn’t have the same trading conditions as your broker’s Demo account.