Get your ingredients ready and preheat the oven to 350 degrees F. Line a large baking sheet with parchment paper or a silicone baking mat and set aside.
In a medium bowl, whisk together the flour, cinnamon, baking soda, salt, nutmeg, ginger, and cloves. Set aside.
In the bowl of a stand mixer, beat together the butter and sugars until creamy. Scrape down the sides of the bowl with a spatula and add in the grated carrots. Mix until well combined. Add the egg and vanilla extract and mix until combines.
Add the dry ingredients and mix on low until just combined. Stir in the oats and raisins, if using.
Stir in the oats. You can add 1/2 cup raisins and chopped nuts, if desired. Scoop the cookie dough, 1 1/2 tablespoons per cookie, onto the prepared baking sheet, 2-inches apart.
Scoop the cookie dough, 1 1/2 tablespoons per cookie, onto the prepared baking sheet, 2-inches apart.
Bake for 10 to 12 minutes or until golden brown around the edges but still a little soft in the center. Remove from the oven and let the cookies cool on the baking sheet for 5 minutes. Transfer to a cooling rack and cool completely.
To make the filling. place the butter in a medium saucepan and melt over medium heat, stirring often, until it foams, smells nutty, and browns. This will take about 5 to 7 minutes. Scrape the browned butter into a medium bowl. Place the bowl in the refrigerator for 30 minutes or until the butter is completely cooled and is mostly resolidified. Remove from the refrigerator and let it come back to room temperature if it’s too cold. You want it to be a soft solid, but not cold so it will mix in with the cream cheese.
In the bowl of a stand mixer, beat the brown butter and cream cheese together until smooth. Add the vanilla and salt and mix again.
Gradually, mix in the confectioner’s sugar, about 3/4 cup at a time, until all the sugar has been added. Scrape down the sides of the bowl with a spatula and mix again until smooth.
To assemble the sandwich cookies, pipe or spread the filling on the flat side of half of the cookies and put the remaining cookies on top. You might have a little leftover filling.