I think it's probably better to inform the user to not close the app or let it go to sleep when a lengthy sync is taking place than to implement some sort of keep awake function to override the system settings.
However, if you really want to keep the app awake, check out this widget by Marcel Groeneweg, or create your own solution based on react-native-keep-awake.