This sounds like a bug to me. If a printout is created for a preliminary invoice, a final invoice number is assigned to it (replacing series ID PR by CD), a PDF file is created for it and status is updated to Printed. When the posting can be created, status changes to PostedAuth. What I have seen before, is that update of series ID is rolled back if status cannot be updated to Printed.
Did you check Customer Invoice Types? Is Preliminary Invoice Series ID set to PR and Definite Invoice Series ID set to CD?
Is a PDF file created?
Is a custom event enabled that might affect this process?
By looking at the command “Electronic fiscal note” it seems like you are running this flow in a Brazil Localization Enabled company. So it its Brazilian localization you have to send the Outgoing nota fiscal to the government and get it approved before doing any posting in invoice level.
which Cloud version are you running? So far in Cloud releases Brazil came as Initial Solution which it means it does not have all the necessary functionalities to operate in Brazil.