Hi Carlota,
You must first enable the feature "Adjust posting date" from the feature management

Then navigate to Account payable > Setup > Account payable parameters > Ledger and sales tax and set the field as "No change"
Please follow this link that details more the steps that you can implement
exploredynamics365.home.blog/.../
Hope that's helpful for you.
Please mark the answer as verified if that's helpful for you.