[Android] Shell TitleView's child elements are cleared too early
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
### Description
When using `` in a .NET MAUI Android application, defining a layout with child elements (such as a Grid containing a Label and a Button) causes the child elements to be cleared immediately upon navigating back using the Shell back button.
Slowed down video:
https://github.com/user-attachments/assets/6e0066c8-b78e-461b-ac4d-3ea6717e1ac7
### Steps to Reproduce
1. Define a Shell.TitleView in XAML:
```xml
```
2. Navigate to the page where this TitleView is used.
3. Press the Shell back button to return to the previous page.
- Expected outcome: The TitleView's child elements should persist and not be cleared after navigating back.
- Actual outcome: On Android, the child elements of the TitleView are cleared immediately after navigating back.
### Link to public reproduction project repository
https://github.com/bhavanesh2001/maui-bugs/tree/shell_title_view
### Version with bug
9.0.90 SR9
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
Unknown/Other
### Affected platforms
Android
### Affected platform versions
_No response_
### Did you find any workaround?
_No response_
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.