Basic macros in Libre Office

I use macros - scientific application for water & steam properties - in libre-office , but at each libre-office update there are lost ! and then I have to re-import them manually ; of course it works but no so efficient as there are some risks of errors by copying some 3000 lines of basic !
Is there anyway to automatically import such macros during updating or not ? If yes , please let me know.

I’m afraid I can´t really help you, but I think macros should not get lost in case of an update.

I found an apparently similar case here[1].

Perhaps it helps.