A quick and dirty approach to fixing forcing the incorrect height measurements where we revert back to the solution where we measure just the inner message and the inline engagement.
The issue with this solution was that the RetrySend component was not visible because I was initially not considering this element when we were forcing the height for composed messages.
However, we don't need to consider this element when we are forcing the height. We only need to force the height of the message that is being measured (which is the inner message and the inline engagement). So I believe an alternate solution that could work here is we can place the RetrySend component outside of the View with the viewStyle (see inline comment below for more clarity) so we aren't considering RetrySend in the first place when we force the height.
Placing RetrySend outside this View should be find since in theory an InlineEngagement and RetrySend should never be rendered at the same time since you can't edit, react, or create a sidebar on a failed local message.
I am aware that with this solution we are losing the benefits of reducing the amount of repeated code and localizing the height-warning logic in the same place that the height-forcing logic is in; however, some of the other solutions that I am exploring are a little more complicated/I need to spend a bit more time testing than I initially expected and I want to get something out soon to unblock native releases asap.
Here is the Linear exchange where @ashoat and I discuss moving forward with this approach
Depends on D8920