Version 23.3.2 Mac, however, I can reproduce in other versions.
Layer in artboard "Test 1", layer menu > duplicate to artboard "Test 2" in the same file. This is correctly performed "live", however, when recording an action or using the recorded ScriptingListener code, the layer is duplicated in the original Artboard 1 and not into Artboard 2.
Here is the result from an action or ScriptingListener output.
Looking at the ScriptingListener code, the correct layer ID for the Artboard 2 is recorded, however, it is being incorrectly duped into Artboard 1.
Opt/alt dragging the layer from Artboard 1 to Artboard 2 does appear to be correctly recorded/played in action or ScriptingListener output.