The holder from Ortlieb I posted earlier matches the position, can handle up to 5kg and extremely durable. I'm using that thing and never faced problems and it stays in position. The holder cost 20€ and is
sold separately. But there are most likely cheaper solutions similar to that one. If you scarify a decent quality bike basket you might get the both parts (holder and detachable part) together for little money.
If you think ybout the Ortlieb part. Look at the
picture you can see that the counterpart could be made very simple. One bar to grab behind the upper claws of the holder. And for the lower part a bend steel wire to latch into the grey snapper in the lower part (it opens if you press the key down). And as a plus: You can lock it, still the lock isn't very good.
If you like I can post a picture of the part that grabs on to that holder.