That is the optimum frequency — if you just wanna reap in the health benefits it could look like:
0 min: start working
10 min: refactored a few things, get a glas of water, look out of the window
40 min: started working on a particular though problem, somewhat stuck, get up and stretch a little while thinking
60 min: found a good solution to though problem, keep it in your head, goto kitchen get another glas of water
120 min: after an hour of uninterrupted flow the though problem is solved, stand up, get a cup of tea, think about whether it is really adequately solved
etc.
Every twenty minutes makes it sound as if you are a slave to the clock and interrupt the flow just whenever — but if you want to make this work you just have to find the spots where standing up feels natural and do it. Those don't have to be exactly 20 minutes apart. Even just standing up
once is already better than staying put for hours.
I program myself and found a change of perspective and bodily motion in the right spots can help concentration, not break it, especially in the long run. Don't let the perfect be the enemy of the good. If you have a variable height desk, you can also alternate between sitting and standing, which can also help as you now have at least two different resting poses with slightly different kinds of strain.