Undo issue with 3D box tool

Related to inkscape#4395 (closed)

Steps to reproduce:

  • open Inkscape
  • draw some 3D box tool
  • undo

What happened?

Last 3D box disappears but penultimate is modified

What should have happened?

penultimate should not be modified

Version info

Inkscape 1.2.2 (732a01da63, 2022-12-09) and Inkscape 1.4-dev (dbcff3872, 2023-06-14) win 11