There are many things that affect the quality of exported files. In this case, what you are probably taking issue with is the interpolation method used. In the canvas, a nearest neighbour interpolation is used, which is very fast and simple, and is good for preserving the jagged edges of pixel art. During export, another interpolation method is used (bilinear I believe), which is slower, but scales more accurately (mathematically speaking) and looks substantially better with basically everything that isn’t pixel art. Antialiasing is applied as well which has a similar, but typically less pronounced effect.
Here is what your animation looks like with bilinear interpolation:
And here’s what it looks like with nearest-neighbour interpolation:
Unfortunately, there is no export option to change this currently. As @JoseMoreno touched upon, carefully choosing your image resolution, canvas resolution, and zoom level carefully can help some. In our nightly builds you specify the exact zoom level you want or choose from a dropdown which makes it much easier to choose a good zoom level. 100% or 150% would both be better than your current zoom level at the end. For now I’ll offer to export your project with the interpolation mode changed like above if you want.
It should be noted there are other common sources of quality loss when exporting. With the movie export in Pencil2D, none of the options are lossless, so there will be some degradation simply by encoding the video. This is typically visually lossless except in extreme scenarios/very discerning eyes. With gifs the same thing applies, although in that case the loss in quality comes from a reduced color palette, not from video artefacts. Generally you do not want to use lossless videos as they grow very large in file size very quickly. Exporting as a PNG sequence avoids this and is helpful for transferring your animation to other animation programs or video compositors/editors. Another source of quality loss is when viewing the videos. If you are not viewing it at exactly 100% resolution, your video player/browser will scale the videos to fit, often using the exact same scaling algorithm you are wanting to avoid.
I will add that even though I’m working in 12 fps, playing the animation in the application is slow enough that to get a good preview of my progress I have to export to a movie to see what it really looks like.
Unfortunately this is probably a limitation of your hardware. Exporting is the right way to preview the animation as accurately as possible obviously. Chances are Pencil2D would be able to playback faster if you were working with smaller images, but of course that will just make your quality problem worse. If you haven’t tried already, do trying playing through twice, as Pencil2D does cache frames after viewing them which helps significantly with playback. When you make a modification, cached frames in the affected area will need to be re-generated.