Add the potatoes to a large pot and cover them with water. Bring the water to a boil, lower the heat, and simmer for 20 minutes.
Drain the water from the potatoes and allow them to cool for a few minutes.
In a large bowl, mash the cooled potatoes until they are smooth and lump-free. Then, add the flour (or whole wheat flour or brown rice flour, if preferred), shredded garlic, and salt. Mix everything thoroughly to form a dough. Once the dough is prepared, allow it to cool in the refrigerator for about 15 minutes. This cooling step will make it easier to handle when shaping the patties.
Preheat a medium-sized pan with oil. Add the onions, cover the pan, and cook on low-medium heat for 5 minutes, stirring occasionally. Uncover the pan, add the mushrooms, and sauté on high heat for 5 minutes, constantly stirring.
Using slightly wet hands, divide the potato dough into 8 equal parts (about ¼ cup or 65g each).Next, shape the patties. Take one patty in your hands (make sure your hands are moist so the dough does not stick), and add 1.5 tablespoons of the mushroom mixture in the middle. Cover with another patty and shape it into a flat, round patty.Coat a large pan with oil and heat it to medium-high heat. Carefully place the potato cakes in the pan and cook for 2 minutes on each side, or until they are lightly golden.
Serve and enjoy these delicious Mushroom Stuffed Potato Pancakes!