When a device does not check in to Jamf School for a period of time, the device will be marked as inactive. The time it takes till devices are marked as unmanaged is configurable at Organization > Settings > General > Device Management.
Normally, shortly after checking in, a device will be active again. However, this is not always the case.
There can be some reasons why a device is not becoming managed again immediately. Most of these reasons are caused by not connecting to the network properly.
To troubleshoot this, switch the Airplane mode on and off.
If this action did not solve your problem, the KeyChain may have become locked. This will cause the issues since the Wi-Fi password will not be transmitted to the Wi-Fi network anymore, causing a log in failure. To unlock this status, enter the passcode of the device, switch the Airplane mode on and off, check the internet connection, and check if the device is managed again.
In addition, you can try to tether the device to a Mac and share its connection. For more information, see the following Apple documentation: macOS Sierra: Share the Internet connection on your Mac.
If these two steps did not help you out, we advise you to gather some information on the device and create a support ticket in Jamf School.