How to snap to grid polygon drawing tool

How can I snap to grid my polygon drawing tool as well as if I want to resize any corner I’m expecting snapping to the grid

If I understand what you are asking for, the PolygonDrawingTool extension already respects the isGridSnapEnabled property. If the behavior isn’t exactly what you want, override the modifyPointForGrid method.