According to correct criterion, which is
k = w/a - (1-w)/b
So, for your example,
k = 0.6/0.2 - 0.4/0.2 = 1 = 100%
This tells that all-in investing strategy (100%) gives the optimal (expected) return. The 0.2 is not the correct optimal fraction. Your simulation verified this point.