The copyfile() method of the macOS API does not seem to use SMB server-side copying, while copying in Finder does appear to use this.
Topic:
App & System Services
SubTopic:
Core OS