If the same number series is set, unposted and posted invoice numbers will definitely be the same. You can create as many unposted invoices as you like and post them in any order, and it will work.
Additionally, if you're strictly working with invoices and not orders, as far as I know unposted sales invoices don’t have a one-to-many relationship with posted sales invoices, meaning each unposted invoice corresponds to one posted invoice. In contrast, sales orders do have a one-to-many relationship with posted invoices, which is why this solution wouldn’t apply to them. However, the original post is focused on invoices, not orders.
Many companies use this approach, so personally I’m unsure why it’s not recommended. In fact, many public companies I've worked with require this setup for audit trails. When an unposted invoice is created and then deleted, the system generates an empty posted invoice with the same invoice number. This ensures there are no gaps in the number series and provides a complete record of every invoice created, even if it was deleted or posted.