My phone occasionally shows my TCL 49” as an option for airplay, and other times does not, and my wifi network is always the same on both devices. Any reasons why this might be happening?
Are you asking why your Roku TV is showing up as an AirPlay device, or why sometimes its shows as available and sometimes not?
For the former, Roku added AirPlay support last fall for some models and this spring for most (recent year) models.
For the latter, WiFi interference, signal weakness, and instability may all play a part:
1) Restart all devices.
2) Try changing the wireless band (2.4Ghz or 5Ghz) your Roku/phone/device is using (use separate 2.4Ghz and 5Ghz SSIDs)
3) Modify the 2.4Ghz/5Ghz band's channel or the channel width via your modem/router/gateway's configuration pages.