Troubleshooting

This solution did not work.

Even after doing so and having the lines completely matching in the preview, the error was still there.

I found a different workaround, removing the cents from the capital gains and rounding into the closer integer number. For some reason this worked as apparently there is rounding problem. This is completely legal per the CRA guidelines. 

 

So my recommendation (this is not financial or tax advise): put in box 53 what you have in 21 and round the number by removing the cents. Then check that all the lines are matching in the preview.