Steps to reproduce crash:
Join a Realm (tested on a Realm I own)
Exit the game without closing (go to homescreen, or lock the device)
Open the game and see "Connection timed out. Connection Lost"
Click "OK" and it will return to the main menu
Open a menu
The game crashes and homescreen is now visible
There are multiple menus that can be opened during step 5 which will cause the game to crash, here are a couple I have tested:
Play -> Create New -> Create New World
Settings
Note: After timing out, and clicking Play, you'll notice that the realms list is in a constant loading state and never fetches the Realms. This is a separate bug which I have now reported here: https://bugs.mojang.com/browse/MCPE-133776 this may provide some context to the resolution of this bug.
This appears to have been fixed, not sure which version it was fixed in, but step 3 can't be reproduced in v1.17.41 on iOS