Hello,
Welcome to Microsoft Q&A!
This IRandomAccessStream does not support the CloneStream method because it requires cloning and this stream does not support cloning.
This exception is because the parameter CreateFromStream method of RandomAccessStreamReference needs is Windows.Storage.Streams.IRandomAccessStream, but the type of WritableBitmap1.PixelBuffer.AsStream.AsRandomAccessStream is System.IO.IRandomAccessStream. So you need to convert the WritableBitmap to Windows.Storage.Streams.IRandomAccessStream. For example:
IRandomAccessStream randomStream = new InMemoryRandomAccessStream();
DataWriter dataWriter = new DataWriter(randomStream);
dataWriter.WriteBuffer(WritableBitmap1.PixelBuffer, 0, WritableBitmap1.PixelBuffer.Length);
await dataWriter.StoreAsync();
args.Data.SetBitmap(RandomAccessStreamReference.CreateFromStream(randomStream));