The situation where the printer starts showing errors at the time of printing is quite frustrating for me as well. However, now it has been a long time since I have faced any issue with my brother printer. On seeing the error message ‘Brother printer offline’ you simply need to make a certain change in the printer settings and this will resolve your Brother printer showing offline error. To make the changes-
Search for ‘Devices and Printers’ on your system in the control panel
Then Right-click on your Brother printer machine icon
Click on See what's printing and select the printer
Then remove the checkmark in front of Use Printer Offline
Hope this will help you fix the issue once and for all.