Documentation Tasks and Test Tasks do not have it's Planned Duration change properly when the Planned Start / End Dates are changed.
This is actually the Out of the Box and expected behavior.
Out of the Box we prevent the calculation of the Planned Start Date, Planned End Date, and Planned Duration for these tables ("rm_doc" and "rm_test") along with some other tables.
This is to prevent any inconsistent results that may arise.
The excluded tables are listed in the Planned Task Recalculation Exclusions table "planned_task_recalculation_exclusions".
If you were to remove the associated record, you would likely be able to have the Duration change after changing the Dates and saving the form.
We, however, do not recommend this removing this exclusion as it was added with intent. If you were to remove it, it would not be supported and you would need to do proper testing.
If you want automatic calculations to happen to these fields based on changing inputs in these records, you will, unfortunately, need to implement that yourself.