In a deep skillet or large pan, heat 2 Tablespoons unsalted butter over medium-high heat and fry 1 small onion in it. Stir until the onions are translucent, which takes about 3-5 minutes.
Turn down the heat and add 2 Tablespoons all-purpose flour. Stir for a minute. Then remove the pot from the heat. Gradually pour in 1 cup vegetable stock and stir diligently to dissolve the lumps. Note: This step requires a bit of patience, but it's worth it. Gradually pour in the warm stock a little at a time, stirring continuously to create a thick, lump-free mash where only the fried onion is visible. Then, gradually add the milk and whisk until smooth.
Return the pot to the stove. Increase the heat until the sauce begins to bubble. Add 1 bay leaf and 2 allspice, and stir in 2 Tablespoons apple cider vinegar. Add 1 cup whole milk. Turn the heat down to low, cover, and let it simmer for 15 minutes on very low heat. The roux will cook through nicely, soften, bind the sauce together, and lose the mealy taste.
Finally, take the pot off the stove and stir in ⅓ cup heavy cream. If the sauce is too thick, add a little milk and whisk. Add 2 teaspoons granulated sugar and, if necessary, season with 1-2 teaspoons salt or vinegar to your liking. Remove the spices—bay leaves and allspice.
If the green beans are long, cut them into pieces about 1 ½ inch in size. Put them in the sauce and let them warm up for a while. Avoid overcooking the sauce, as the cream might curdle, mainly if you use light cream with reduced fat.