Comment, not an answer: have you looked at Experience Builder? I think this product allows you configure an app to include things such as this "get-map coordinates" widget.
https://developers.arcgis.com/experience-builder/guide/get-map-coordinates/