For MacOS, open the AppInfo.xcconfig file by following the path macos/Runner/Configs/AppInfo.xcconfig and edit the product name section.
PRODUCT_NAME = your_app_name