This issue with the login-first-as-Manager in the Leave Request template comes from the AllItems property for galleries. It is used twice with CountRows() and gives a wrong value of zero resulting in a crash followed by empty galleries.
The workaround is to replace, in CounRows(), the AllItems by the initial filter used in the gallery's Items property.
For instance, for GalleryRequests change the Visible property:
CountRows(GalleryRequests.AllItems) > 0
To:
CountRows(
If( _requestTFilter="All",
Filter('Leave Requests', If(_managerView, Approver = _myProfile.UserPrincipalName, Requester = _myProfile.UserPrincipalName)),
Filter('Leave Requests', Status=_requestTFilter && If(_managerView, Approver = _myProfile.UserPrincipalName, Requester = _myProfile.UserPrincipalName)) )
) > 0
The other one to modify is in the Height property of GalleryRequestDetails:
CountRows(GalleryRequestDetails.AllItems)*75
Et voila, the crash should not happen after that.
Also, unrelated issues but worth to know, _requestTypeFilter should be replaced by _requestTFilter, or vice-versa. Timers are also screwing the whole thing up. Remove them and use the SetFocus() in the HomeScreen OnVisible property:
Switch(_requestTFilter, "All", SetFocus(Button2), "Approved", SetFocus(Button2_2), "Pending", SetFocus(Button2_1), "Declined", SetFocus(Button2_3))