It does not work like that,
No yeast will stop exactly at 5% (unless you kill it), this way of doing things is not safe !
First solution is to make your wort so that you end up with the correct among of alcohol after complete fermentation, and afterwards add non-fermentable sugars to your fermented wort.
Some usual non-fermentables are maltodextrin or lactose sugars, or stevia, Xylitol, sucralose for artificial ones. (one ressource about ciders: http://diyhardcider.com/best-hard-cider-artificial-sweeteners-and-sugar-substitutes/)
E.g. if you start with a 20L wort at 1.050 and your yeast takes your wort to 1.010 (giving approx 5.25% ABV), then you should of non-fermentable sugars untill you reach 1.025 (or simply desired sweetness, especially if using artificial sweeteners than much less)
One other way could be to stop your fermentation at some point by pasteurizing (thus killing all the yeast in tour wort) or somehow inhibit the yeast by adding potassium sorbate (see https://www.homebrewersassociation.org/how-to-brew/how-to-backsweeten-mead-and-cider/), but here you cannot be 100% sure that fermentation will never happen, there could always be residual active yeast cells.
E.g. prepare a 20L wort with gravity 1.060 and stop it(kill the yeast) at 1.020, which would leave you with 5.2% ABV.