How do I fix a loss of voice from shouting?

Avoid shouting. The best way to stop this is to stop having to shout. Let others know that you cannot shout and have to keep your voice. If you still find your voice going, you might benefit from a visit to an otolaryngologist (an ear, nose, and throat doctor) for vocal cord/speech therapy, or see your regular doctor for correct direction.