The toggle between a 'grid' and 'list' view is a common design pattern that has already been used quite a lot on traditional desktop applications like File Explorer on Windows or other operation systems, and the overlap/similarity between desktop and web application these days means that most people will be familiar with the design pattern.
The key thing to be aware of in your case is for there to be a clear trigger for when this is going to happen. The toggle allows this to be user controlled, but when you are doing this automatically when the viewport size changes then it is about making sure that the transition is consistent and clear to the user (e.g. from a desktop to a mobile view) so that it is not just the view that changes but the rest of the experience is also consistent with the viewport.
In terms of the transition, there are some guidelines in the Material Design documentation for UI interactions, but I am not aware of any specific points referring to the transition between viewports, but generally you want to make it subtle enough so it is not distracting to the user or interrupts the viewing flow.