Mac/iOS: Focus is important when it comes to any task, and if you have trouble staying focused while writing, Flowstate can help. Namely because, if you get distracted and stop writing, it will delete your progress. You set a timer for anywhere between five and 180 minutes, then start typing. If you stop for more than five seconds, the text starts to disappear. You then have another couple of seconds to take action until your writing is deleted and the timer resets.
It's similar to previously mentioned "The Most Dangerous Writing App", but Flowstate created theirs first. You can also choose from different fonts with Flowstate, and rather than being limited to a web app version, you can download the program and work offline, no internet connection or browser required. It does cost money, though, and the desktop version is $14.99 while the app is $7.99. You can check them out at the links below.