Mapbox has lots of examples, where features are loaded in the beginning and then are available forever. T.e. the measurement example:
https://docs.mapbox.com/mapbox-gl-js