Whisk together the sugar, flour, and salt in a saucepan over medium heat. Cook for 1 to 2 minutes to toast the flour.
Pour in the vegan milk and use a whisk or spatula to stir it in.
Continue stirring as the mixture comes slowly to a low boil and thickens. Don't turn up the heat, or you'll risk burning it. Once it's thick enough that a spoon leaves a trail, transfer it to a heat-proof bowl, cover it with waxed paper touching the surface (to prevent a skin from forming), and refrigerate until completely cool.
Once the flour mixture is cool, add the butter to a mixing bowl and mix on medium-high speed until light and fluffy, around 2 minutes.
Turn the mixer speed down to medium and spoon in the cooled flour mixture, a spoonful at a time, mixing to incorporate it until adding more. You'll need to scrape down the sides of the bowl regularly.
Once all the flour mixture is added and mixed, add the vanilla, turn up the speed to medium-high, and whip for up to a minute, until the frosting is light and fluffy.
You can use this frosting immediately on a cooled cake. Otherwise, cover the frosting and store it in the fridge for up to 5 days. When you're ready, let it sit at room temperature for about 30 minutes, then use a mixer to whip it aga¼in to make sure it's light and fluffy. You can freeze this frosting in freezer-safe bags or containers for up to 3 months. When you're ready to use it, thaw it overnight in the fridge, then follow the tip above to whip it again.