One possibility is that the cassette freehub is not functioning properly, or something (such as a broken spoke protector) ir preventing the cassette from freewheeling. When you stop pedaling, the chain should stop moving as well. If it continues to move, the chain is under no tension at all. Because of the lack of tension, even with a narrow wide chainring the chain could derail.