A. Disable location sharing in the Messages app by going to Settings > Privacy > Location Services > Messages and selecting 'Never' or 'While Using the App'.
B. Before sending your location, double-check that you are not accidentally tapping the location button. Take your time when navigating the app.