SmartThings pings devices (mains powered) regularly. If it doesn’t receive a response it makes it offline. For battery powered devices it waits for them to wake up and ping the hub and if it doesn’t see this or the ping is lost it marks it offline. This can happen sometimes due to mesh issues. If packets are lost then it appears to be offline. Try adding a few repeaters and doing a zwave repair.